Month NOVEMBER example
Description
Month NOVEMBER
defines the
singleton instance for the month of November with 30 days.
This has the numeric value of 11.
Syntax
NOVEMBER
has the following syntax.
public static final Month NOVEMBER
Example
The following example shows how to use NOVEMBER
.
import java.time.Month;
//from w ww . j a v a2s . c om
public class Main {
public static void main(String[] args) {
Month m = Month.NOVEMBER;
System.out.println(m.getValue());
System.out.println(m.name());
System.out.println(m.ordinal());
}
}
The code above generates the following result.