Java Calendar DAY_OF_MONTH
Syntax
Calendar.DAY_OF_MONTH has the following syntax.
public static final int DAY_OF_MONTH
Example
In the following code shows how to use Calendar.DAY_OF_MONTH field.
/*from w ww.j a va 2 s.c om*/
import java.util.Calendar;
public class Main {
public static void main(String[] args) {
Calendar now = Calendar.getInstance();
System.out.println(now.getTime());
System.out.println(now.get(Calendar.DAY_OF_MONTH));
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »