日期:2014-05-20 浏览次数:20605 次
import java.util.Arrays;
import java.util.List;
public class Demo {
public static void main(String[] args) {
int[] arr = {1,2,3};
List<int[]> l1 = Arrays.asList(arr);
for (int[] is : l1) {
for (int i : is) {
System.out.println(i);
}
}
Integer[] arr2 = {3,4,5};
List<Integer> l2 = Arrays.asList(arr2);
for (Integer integer : l2) {
System.out.println(integer);
}
}
}