Hi,
I am preparing for SCJP1.5 exam..Can anyone tell me the output of following programs
class
Test {
public static void main(
String arg[]) {
int x=5;
int y=6;
int sum=x+y;
System.out.printf("%d + %d = %d\n"+x,y,sum);
System.out.format("%d + %d = %d\n"+x,y,sum);
System.out.println(x + "+" + y + "= " + sum);
}
}
why am i getting run time exception for first 2 sop statements? I tried with %1$d %2$d also