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.
"%-15s%03d%n"
'-' : Indicates to left justify indicator
'15s' : Indicates string's minimum field width & 's' dentotes string.
'%': Again we used '%' it shows declaring antoher column
'03d' : Here '0' represents placing 0 before number if it needs
(eg: 001,090) , 3d used for denoting 3 for integer's field width
and 'd' is used for printing integer value.
'%n' : prints new line
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Output Formatting
You are viewing a single comment's thread. Return to all comments →
"%-15s%03d%n" '-' : Indicates to left justify indicator '15s' : Indicates string's minimum field width & 's' dentotes string. '%': Again we used '%' it shows declaring antoher column '03d' : Here '0' represents placing 0 before number if it needs
(eg: 001,090) , 3d used for denoting 3 for integer's field width and 'd' is used for printing integer value. '%n' : prints new line