This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Object objRef; Object[] objArray = new Object [3]; int[] intArray = new int[10]; ObjRef = intArray ; //possible objArray = intArray ; //not possible Why?
Gopinath Rajgopal
Ranch Hand
Joined: Jun 26, 2000
Posts: 31
posted
0
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[0] = intArray ; Hope this helped.
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Thanks Gopinath Rajgopal.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.