mohitkumar gupta wrote:what's difference between format and printf in java.io.Console ?
Other than the name, nothing whatsoever.
format is the "natural" name,
printf is there for familiarity for C/C++/etc users, as it's very similar to the function of that name in those languages.
As the API docs say:
Java API wrote:A convenience method to write a formatted string to this console's output stream using the specified format string and arguments.
An invocation of this method of the form con.printf(format, args) behaves in exactly the same way as the invocation of con.format(format, args)