} } Now my point is there any practical use of converting object to array type becoz we r not even able to access array members(like length) with reference -o though both o & b referencing to the same object(i.e int array) Thanks rishi
sorry for the half post.. can u please give an example..becoz I think even if u pass the object reference o to any method I dont see any use..
Joined: May 05, 2000
You don't see any use in passing an array as an object? How about if you wish to store an array in an ArrayList? Normally you don't need to cast an array to an Object. But you can because of the inheritance hierarchy. And since you can, you can store a bunch of arrays in any Collection or Map object.
Joined: Jun 25, 2003
actually Iam preparing for scjp1.4 in the order of exam objectives ..so I dont have much idea about Arraylist ,Collections.. anyway...Thanks a lot Thomas ..I will keep this as note ...Hope I will get more idea when I come across Collections topic... rishi