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 returns a formatted string. System.out.printf also prints the formatted string.
String.format
System.out.printf