This content has been marked as final. Show 4 replies
It seems that the format method returns the PrintStream (allowing you to chain method calls), and the return value is being printed.
You would get the output you're looking for, if you use the String.format() method, since that'll return the formatted String.
In scrapbook also I get the result(Expected)
int i = 461012;The value of i is: 461012
System.out.format("The value of i is: %d", i);
No deviation from the normal.
That did it, thank you.
I wonder if we have different versions of Eclipse? Mine is Version: 4.2.2
Build id: M20130204-1200.