- import java.util.*;
- class AsListDemo
- {
- public static void main(String[] args)
- {
- int[] arr = {6, 9, 4, 5, 2, 0};
- String[] s = new String[arr.length];//手动将基本数据类型进行装箱动作
- for(int x=0;x<arr.length;x++)
- {
- s[x] = Integer.toString(arr[x]);
- }
- //String[] arr = {"abc", "cc", "eqw"};
- List<String> al = Arrays.asList(s);
- System.out.println(al);
-
- }
- }
复制代码 |