Here you can find the source of formatTimeDigital(int time)
public static String formatTimeDigital(int time)
//package com.java2s; //License from project: Open Source License public class Main { public static String formatTimeDigital(int time) { int mins = time / 60; int secondsInteger = time % 60; String seconds = String.valueOf(secondsInteger); if (seconds.length() == 1) { seconds = "0" + seconds; }//w w w. j a va 2 s . com return mins + ":" + seconds; } }