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