Thread: printf Problem
View Single Post
Old Jan 10th, 2007, 10:23 PM   #3
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 909
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Baffling.

The printf function of PrintStream (of which System.out is an instance) is new to Java 5. Most likely you need to update the version of Java your computer is running.

According to the documentation, your code is incorrect; the second argument to printf should be an Object array containing the "arguments referenced by the format specifiers of the format string." However, when I run your code in Eclipse on my computer, it works fine.
titaniumdecoy is offline   Reply With Quote