In Java 8 we can also make use of streams e.g.
String[] strings = Stream.of("First", "Second", "Third").toArray(String[]::new);
In case we already have a list of strings (stringList
) then we can collect into string array as:
String[] strings = stringList.stream().toArray(String[]::new);