The following sections use 's' as the conversion character for the format specifiers.
The 's' conversion formats its argument as string.
For the following code
System.out.printf("%s, %s, and %s", "Java", "Json", "Javascript");
its output:
Java, Json, and Javascript
A format specifier can refer to an argument in three ways:
public class Main { public static void main(String[] args) { System.out.printf("%s, %s, and %s", "Java", "Json", "Javascript"); }/*w ww . j av a 2 s. c om*/ }