Here you can find the source of min2sex(Integer minutes)
public static String min2sex(Integer minutes)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static String min2sex(Integer minutes) { Integer hrs = minutes / 60; Integer mns = minutes % 60; // Geez! this is awful, is there not a better way? Assembly code? StringBuilder buf = new StringBuilder(); if (hrs < 10) { buf.append("0"); }//from ww w . j av a 2 s .c o m buf.append(hrs.toString()); buf.append(":"); if (mns < 10) { buf.append("0"); } buf.append(mns.toString()); return buf.toString(); } }