public enum Month extends Enum<Month>
| Enum Constant and Description |
|---|
April
四月
|
August
八月
|
December
十二月
|
February
二月
|
January
一月
|
July
七月
|
June
六月
|
March
三月
|
May
五月
|
November
十一月
|
October
十月
|
September
九月
|
| Modifier and Type | Field and Description |
|---|---|
private int |
month |
| Modifier and Type | Method and Description |
|---|---|
int |
getMonth() |
static Month |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Month[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Month January
public static final Month February
public static final Month March
public static final Month April
public static final Month May
public static final Month June
public static final Month July
public static final Month August
public static final Month September
public static final Month October
public static final Month November
public static final Month December
public static Month[] values()
for (Month c : Month.values()) System.out.println(c);
public static Month valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getMonth()
Copyright © 2023. All rights reserved.