Here you can find the source of format(long s)
private static String format(long s)
//package com.java2s; //License from project: Open Source License public class Main { private static String format(long s) { if (s < 10) { return "0" + s; } else {/*from w w w . j a v a2 s . com*/ return "" + s; } } }