Here you can find the source of secondsToString(long seconds)
public static String secondsToString(long seconds)
//package com.java2s; //License from project: Open Source License public class Main { public static String secondsToString(long seconds) { long h = seconds / 3600; long m = (seconds - (h * 3600)) / 60; long s = seconds - (h * 3600) - (m * 60); return String.format("%02d:%02d:%02d", h, m, s); }//from w w w . ja v a 2 s . c o m }