public enum Department extends Enum<Department>
| Modifier and Type | Method and Description |
|---|---|
static Department |
getRandomDepartment() |
String |
getStringRepresentation() |
String |
toString() |
static Department |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Department[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Department SERVICES
public static final Department MARKETING
public static final Department SALES
public static Department[] values()
for (Department c : Department.values()) System.out.println(c);
public static Department 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 static Department getRandomDepartment()
public String getStringRepresentation()
public String toString()
toString in class Enum<Department>Copyright © 2025. All rights reserved.