public class Application {
public static void main(String[] args) {
int i;
for (i=0;i<5;i++)
{
System.out.printf("The value of integer is: %d",i);
}
}
}
以下是执行后的输出
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int)
at Application.main(Application.java:6)