Java examples for java.util:Millisecond
return hour,minute,second
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from www.j av a2 s . c o m*/ * * return hour,minute,second * * @return * */ public static String[] GetCurentTime() { SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); Date date = new Date(System.currentTimeMillis()); String string = df.format(date); String[] datesss = string.split(":"); return datesss; } }