Java tutorial
public class PrintfExamples { public static void main(String[] args) { System.out.printf("num is %03d\n", 5); } } /* num is 005 */