Java Calendar get milliseconds

Description

Java Calendar get milliseconds


import java.util.Calendar;
 
public class Main {
 
  public static void main(String[] args) {
    Calendar now = Calendar.getInstance();
    System.out.println("Current milliseconds since Jan 1, 1970 are :"
                  + now.getTimeInMillis());
  }/*ww w. jav  a2 s .  c  om*/
}



PreviousNext

Related