Here you can find the source of getCurrentTime(Date _d)
public static String getCurrentTime(Date _d)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getCurrentTime(Date _d) { SimpleDateFormat formatter = new SimpleDateFormat("HHmmss"); return formatter.format(_d); }//from w ww .j a v a2 s . c o m }