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