We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
format - a format string as described in Format string syntax e.g ("%-15s%03d%n", s1, x);
here, % used for formatter or divider b/w different formatter, 15s is the string's widht as asked in thee question 0 adds the trailing zeros in the integer. 3d is the integer's width.
args - Arguments referenced by the format specifiers in the format string.
Java Output Formatting
You are viewing a single comment's thread. Return to all comments →
printf(String format, Object... args)
format - a format string as described in Format string syntax e.g ("%-15s%03d%n", s1, x); here, % used for formatter or divider b/w different formatter, 15s is the string's widht as asked in thee question 0 adds the trailing zeros in the integer. 3d is the integer's width.
args - Arguments referenced by the format specifiers in the format string.