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,
Another ways :
First one
Arrays.asList(FieldType.values()) .stream() .map(f -> f.toString()) .toArray(String[]::new);
Other way
Stream.of(FieldType.values()).map(f -> f.toString()).toArray(String[]::new);