Here you can find the source of getSecond(Date date)
public static int getSecond(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static final int SECOND = 1; public static int getSecond(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date);/*ww w .j a v a 2s. c om*/ return c.get(Calendar.SECOND); } }