Java tutorial
//package com.java2s; public class Main { static final String[] sTwoCharacterNumbers = new String[] { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }; static String formatTwo(int num) { if (num <= 12) { return sTwoCharacterNumbers[num]; } else return Integer.toString(num); } }