Bookmark Topic Watch Topic
  • New Topic

Data Types Converison :Array to Object  RSS feed

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Report post to moderator
As in Java ,WE can aasign an array object to object of Object class.
ie
Object o;
int arr[]={1,2,3};
o=arr; //legal
Since arr refers to some list of values in memory ,After o=arr ,o also points to same memory location ,
Can'nt we access to the values beging refernced (list of values) through object o.

Thnx
 
Campbell Ritchie
Marshal
Posts: 56581
172
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to the Ranch.
Please don't post the same question twice.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Followups go here please.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!