分类:
2009-01-02 15:22:19
List
list.add("a1");
list.add("a2");
String[] toBeStored = list.toArray(new String[list.size()]);
for(String s : toBeStored) {
System.out.println(s);
}
方法3:
List
list.add("a1");
list.add("a2");
String[] toBeStored = new String[al.size()];
list.toArray(toBeStored);
for (String s : toBeStored) {
System.out.println(s);
}
方法4:
List
list.add("a1");
list.add("a2");
String[] toBeStored = new String[]{};
String[] str = al.toArray(toBeStored);
for (String s : str) {
System.out.println(s);
}