Here you can find the source of getMinuteFromHMS(String hms)
public static String getMinuteFromHMS(String hms)
//package com.java2s; public class Main { public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss"; public static String getMinuteFromHMS(String hms) { if (hms == null || hms.length() != DEFAULT_TIME_FORMAT.length()) { return null; }/*from w ww . jav a 2 s . c om*/ return hms.substring(3, 5); } }