Object objRef; Object objArray = new Object ; int intArray = new int; ObjRef = intArray ; //possible objArray = intArray ; //not possible Why?
Joined: Jun 26, 2000
Hi, This is a case of assigning a value to the array reference. For an array to be equated to another array, every element in it should be convertible to the other array type. Here, it is int to Object which is not possibe. objArray is an array of Object references. Hence the following will work: objArray = intArray ; Hope this helped.