Java tutorial
//package com.java2s; public class Main { /** * Returns String format of integer with padding of 2 digits. * * @param number * the number to format * @return the String format of the given number. */ public static String pad(int c) { if (c >= 10) { return String.valueOf(c); } else { return "0" + c; } } }