Here you can find the source of pad(int c)
public static String pad(int c)
//package com.java2s; public class Main { public static String pad(int c) { if (c >= 10) return String.valueOf(c); else//from ww w .j a v a2 s . c o m return "0" + String.valueOf(c); } }