Here you can find the source of toDoubleDigit(int number)
public static String toDoubleDigit(int number)
//package com.java2s; //License from project: Apache License public class Main { public static String toDoubleDigit(int number) { if (number >= 0 && number < 10) { return "0" + ((Integer) number).toString(); }/*from w w w . ja v a 2s . c o m*/ return ((Integer) number).toString(); } }