code:
-----
for(int i=0; i<=9; i++)
System.out.println("x[i] = "+x[i]);
you know i was expecting x[0]= value
x[1]= value
-----
x[9]= value
its just formatted output....
i know i did a mistake...it should be
System.out.println("x["+i+"] = "+x[i]);
i dont know why "+i+" is needed?
this could have been x[+i] or x[i].... but why x["+i+"] ??????
so actually i want to know what is the rule for formatting here.
if it had been C language...i could have written...
...printf("x[%d]",i,x[i]);
what is the rule for formatted output in java???