Java Date Time - Java Calendar DATE








Syntax

Calendar.DATE has the following syntax.

public static final int DATE

Example

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

import java.util.Calendar;
/*w  w  w  .j  ava 2 s .  c  om*/
public class Main {
  public static void main(String[] args) {

    Calendar now = Calendar.getInstance();

    System.out.println(now.get(Calendar.DATE));

  }
}

The code above generates the following result.