I'm doing a intro to programming course and I'm having issues with my Eclipse that doesn't seem to want to run printf
in even its simplest form.
My code is:
package Practice;
import java.io.*;
public class Printf {
public static void main(String[] args) throws IOException
{
int num1 = 54;
int num2 = 65;
int sum = num1 + num2;
System.out.printf("Sum of %d and %d is %d.", num1, num2, sum);
}
}
The error is as saying
The method
printf(String, Object[])
in the typePrintStream
is not applicable for the arguments(String, int, int, int)
I have the Java compiler compliance level set to 1.8 so it should have no issues as I have read in previous posts. Kepler version of Eclipse has had the Java 8 patch applied (so I could comply with 1.8)
No site I have found has given me any other clues as to what the issue could be?