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.
This can be easily done using the format specifiers to format the output
%03d is used to set the padding for trailing zeros instead of whitespaces.
import java.util.Scanner;
Java Output Formatting
You are viewing a single comment's thread. Return to all comments →
This can be easily done using the format specifiers to format the output %03d is used to set the padding for trailing zeros instead of whitespaces. import java.util.Scanner;
public class Solution {
}