Here you can find the source of minutesToShortTime(int minutes)
public static String minutesToShortTime(int minutes)
//package com.java2s; //License from project: Apache License public class Main { public static String minutesToShortTime(int minutes) { StringBuilder sb = new StringBuilder(5); int h = minutes / 60; int m = minutes % 60; if (h < 10) sb.append('0'); sb.append(h);/*from ww w . ja v a 2 s . c om*/ sb.append(':'); if (m < 10) sb.append('0'); sb.append(m); return sb.toString(); } }