|resolved: Is there something new with printf()/ [message #926753]
||Fri, 28 September 2012 19:59
| Gregory Hansen
Registered: September 2012
I took several Java programming classes six and seven years ago. When I got a job six+ years ago, they didn't use Java. So, now I am trying to refresh my knowledge of Java using the textbook from seven years ago.|
One of the example programs has the following command:
System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
Now, when I enter this program, I get the following message:
"The method printf(String, Object) in the type PrintStream is not applicable for the arguments (String, Object)"
Even a simple command like "System.out.printf( "%s", "cow" );" returns the above error.
Please help me determine what I'm missing.
[Updated on: Mon, 01 October 2012 00:11]
Report message to a moderator