Here you can find the source of secondsToTime(double seconds)
public static String secondsToTime(double seconds)
//package com.java2s; //License from project: Apache License public class Main { public static String secondsToTime(double seconds) { int hours = (int) (seconds / 3600); int minutes = (int) ((seconds % 3600) / 60); int secs = (int) (seconds % 60); return String.format("%02d:%02d:%02d", hours, minutes, secs); }//from w w w.j a v a 2 s . c o m }