为什么不能由Object[]数组强转成Integer[]数组. Object[] ins= { new Integer(0), new Integer(1), new Integer(2), new Integer(3), }; Integer[] i = (Integer[]) ins; 执行时,系统报 Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast
public static void main(String[] args){ //创建一个int数组,长度为100, int n = 100; int[] arrayInt = new int[n]; Random random = new Random(); ArrayList myList = new ArrayList(); while(myList.size() < 100){ //随机函数生成0-100的整数 int num = random.nextInt(101); //myLi