import java.util.*;
public class ArrayAsListDemo {
public static void main(String[] args) {
Integer[] arr = {1, 3, 5, 7, 9};
List
System.out.println(lis);
}
}
以String 数组举例吧:
String[] s = {"a","b","c"薯纤};
List
for(int i = 0;i < s.length;i++){
list.add(s[i]);
}
例肆虚如:尺雹兆
int [] buffer = {1,2,3,4,5};
ArrayList
List
list.add("兄蠢厅new出来的对象");