public enum Element {
H("Hydrogen"),
HE("Helium"),
// ...
NE("Neon");
public final String label;
private Element(String label) {
this.label = label;
}
}
Size.valueOf("SMALL")
// returns constant SMALL.
Size[] enumArray = Size.value();