What\'s the easiest and/or shortest way possible to get the names of enum elements as an array of Strings?
String
What I mean by this is that if, for example,
If you can use Java 8, this works nicely (alternative to Yura's suggestion, more efficient):
public static String[] names() { return Stream.of(State.values()).map(State::name).toArray(String[]::new); }