Here you can find the source of formatSeconds(final int total)
public static String formatSeconds(final int total)
//package com.java2s; //License from project: Open Source License public class Main { public static String formatSeconds(final int total) { final int minutes = (total / 60); final int seconds = (total % 60); String secs = Integer.toString(seconds); if (seconds < 10) { secs = "0" + seconds; }/*w ww . j av a2 s. c o m*/ final String time = minutes + ":" + secs; return time; } }