When I first started java, I missed the printf function of C a lot. But after a while. I came to know that printf is also available in Java.printf is defined by java.io.PrintStream. It works the same way the C printf function does. There is an overloading of the printf method that includes a Locale in the parameter list. I dont know that well about Locale so I am not explaining it.

Oh, I think some of you may not be familiar with PrintStream. But for sure you have used an object of it in the very first "Hello World" program of yours. Its the System.out. So you can write: