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