I was just wondering what were the advantages and disadvantages of using System.out.printf();
We normally use System.out.println();
or System
Printf allows special formatting:
http://java.sun.com/developer/technicalArticles/Programming/sprintf/
That is the advantage. Otherwise there is no disadvantage to calling print() as you do now.
Look at the JavaDoc of the class PrintStream. There you can see that the print / println methods print a String and printf is
- A convenience method to write a formatted string to this output stream
- using the specified format string and arguments.