日期:2014-05-20 浏览次数:20762 次
import java.util.*;
public class Test
{
public static void main(String [] args)
{
int a = 20;
Integer b = new Integer(20);
Integer i =10;
List<Integer> list = new ArrayList<Integer>();
list.add(i);
list.add(b);
list.add(new Integer(30));
System.out.println(list);
Integer[] array = new Integer[list.size()];
list.toArray(array);
for(Integer e: array)
{
System.out.println(e);
}
int brray[] = new int[array.length()]; //array是个数组,为什么array.length()不成功呢?
}
}