Java Date Time - Java Calendar MILLISECOND








Syntax

Calendar.MILLISECOND has the following syntax.

public static final int MILLISECOND

Example

In the following code shows how to use Calendar.MILLISECOND field.

import java.util.Calendar;
import java.util.GregorianCalendar;
/*from   w  w w  .  ja  v a2s .  c  o  m*/
public class Main {

  public static void main(String[] args) {

    Calendar cal = new GregorianCalendar();   
    System.out.println(cal.get(Calendar.MILLISECOND));
    
    
  }
}

The code above generates the following result.