may i know what is the difference between the two in java? i am reading a book and it can either use both of it to display strings.
These two methods exhibit the exact same behavior. We can use the format(...) with String, Java.util.Formatter (J2SE 5) and also with PrintWriter.