Thread: printf Problem
View Single Post
Old Jan 11th, 2007, 7:56 PM   #4
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Quote:
Originally Posted by titaniumdecoy View Post
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.
Oops. That's the other thing I meant to mention.
Booooze is offline   Reply With Quote