What\'s the best way to convert HashSet to String[]?
HashSet
String[]
The JB Nizet's answer is correct. In Java 15, the better answer is:
set.toArray(new String[0]);