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.
String.format formats strings, doesn't display them. I think you mean System.out.println(String.format("......", ....)) or some similar construct ?
String.format
System.out.println(String.format("......", ....))