📅  最后修改于: 2022-03-11 14:52:04.055000             🧑  作者: Mango
Set set = new HashSet();
set.add("Apple");
set.add("Orange");
set.add("Banana");
String[] myArray = new String[set.size()];
set.toArray(myArray);