wood burning stoves 2.0*
The moose likes Java in General and the fly likes Assigning a array of array to an Object reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Assigning a array of array to an Object reference" Watch "Assigning a array of array to an Object reference" New topic
Author

Assigning a array of array to an Object reference

ramya narayanan
Ranch Hand

Joined: Oct 06, 2008
Posts: 338
Dear All,
I've an challenge with casting an 2-D array to an object reference.
When I'm trying to use the object reference index values to cast it into an one dimensional array, it throws compile time error whereas i am able to cast that object reference to another 2-D array.

This is my code

When I compile it:

Also when I try to get the values of that object reference through this


The same error is showing up in console.
Why is it happening ?
Regards
Peter Lawrey
Ranch Hand

Joined: Dec 21, 2008
Posts: 62
try
ramya narayanan
Ranch Hand

Joined: Oct 06, 2008
Posts: 338
Thanks Peter!
Now it's working.



Regards.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Assigning a array of array to an Object reference