public static enum Person.MaritalStatus extends Enum<Person.MaritalStatus>
| Modifier and Type | Method and Description |
|---|---|
static Person.MaritalStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Person.MaritalStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Person.MaritalStatus MARRIED
public static final Person.MaritalStatus SINGLE
public static Person.MaritalStatus[] values()
for (Person.MaritalStatus c : Person.MaritalStatus.values()) System.out.println(c);
public static Person.MaritalStatus 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 nullCopyright © 2026. All rights reserved.