Thread: printf Problem
View Single Post
Old Jan 10th, 2007, 8:52 PM   #1
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
printf Problem

String str = new String( "Java is object oriented.");
System.out.printf("|%s|%n", str);

The above code will work in "EditPlus" (which is what my college uses). While, it won't work in "Eclipse".

What would be the reason behind this?

Error:
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, String)
__________________
Death smiles at us all. All a man can do is smile back.

Last edited by Eric the Red; Jan 10th, 2007 at 9:02 PM.
Eric the Red is offline   Reply With Quote