Here you can find the source of getTimeString()
public static String getTimeString()
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static String getTimeString() { return new SimpleDateFormat("HH:mm:ss").format(nowDate()); }//from w w w . j a v a 2 s. c om public static java.util.Date nowDate() { return new java.util.Date(); } }