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,
Here`s an elegant solution using Apache Commons Lang 3:
EnumUtils.getEnumList(State.class)
Although it returns a List, you can convert the list easily with list.toArray()
list.toArray()