调用库函数:
String[] s = {"aa","bb","cc","dd","ee"};
List<String> list = Arrays.asList(s);
String[] s1 = (String[]) list.toArray();
String[] s = {"aa","bb","cc","dd","ee"};
ArrayList<String> list = new ArrayList<String>();
for (String string : s) {
list.add(string);
}
时间: 2024-10-11 23:23:24