Here you can find the source of parseTime(String s)
public static Time parseTime(String s)
//package com.java2s; //License from project: Open Source License import java.sql.Time; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { private static SimpleDateFormat simpleTimeFormat = new SimpleDateFormat("HH:mm:ss"); public static Time parseTime(String s) { if (s == null) { return null; }//w w w . j av a 2 s . c om try { return new Time(simpleTimeFormat.parse(s).getTime()); } catch (ParseException e) { return null; } } }