SyntaxFix
Write A Post
Hire A Developer
Questions
The String class comes with the format abilities:
System.out.println(String.format("%02d", 5));
for full documentation, here is the doc