You are viewing a single comment's thread. Return to all comments →
what is mean of printf
System.out.printf("%-15s%03d%n", s1, x);
("%-15s%03d%n", s1, x) % : used as a formatter. '-' : minus sign used for left indentation of the string. 15s : here 15 denotes the string's minimum field width 15. '0' : pads the extra 0s in the integer. 3d : here 3 denotes integer's minimum field width 3. %n : prints the new line.
Hope, this helps!