Here you can find the source of getSeconds(String time)
public static int getSeconds(String time)
//package com.java2s; //License from project: Open Source License public class Main { public static int getSeconds(String time) { String[] timeTmp = getTimeFromString(time); return Integer.parseInt(timeTmp[2].substring(0, timeTmp[2].indexOf("."))); }/*w w w . j ava 2s .com*/ private static String[] getTimeFromString(String time) { String[] tmp = time.split(" "); String[] time_tmp = tmp[4].split(":"); return time_tmp; } }