question: public static String formatMillis ( int millis ) { String result = "" ; int hr = millis / 3600000 ; millis %= 3600000 ; int min = millis / 60000 ; millis %= 60000 ; int sec = millis / 1000 ; if ( hr > 0 ) { result += hr + ":" ; } if ( min >= 0 ) { if ( min > 9 ) { result += min + ":" ; } else { result += "0" + min + ":" ; } } if ( sec > 9 ) { result += sec ; } else { result += "0" + sec ; } return result ; }
target:  Formats time in milliseconds to hh:mm:ss string format.