code: public static String toTimeString(int hour, int minute, int second) {
  		String hourStr;
  		String minuteStr;
  		String secondStr;
  
  		if (hour < 10) {
  			hourStr = "0" + hour;
  		} else {
  			hourStr = "" + hour;
  		}
  		if (minute < 10) {
  			minuteStr = "0" + minute;
  		} else {
  			minuteStr = "" + minute;
  		}
  		if (second < 10) {
  			secondStr = "0" + second;
  		} else {
  			secondStr = "" + second;
  		}
  		if (second == 0)
  			return hourStr + ":" + minuteStr;
  		else
  			return hourStr + ":" + minuteStr + ":" + secondStr;
  	}
docs: Makes a time String in the format HH:MM:SS from a separate ints for hour,
  minute, and second. If the seconds are 0, then the output is in HH:MM.
  
  @param hour
  The hour int
  @param minute
  The minute int
  @param second
  The second int
  @return A time String in the format HH:MM:SS or HH:MM