Bookmark Topic Watch Topic
  • New Topic

Data Types Converison :Array to Object  RSS feed

 
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
 
Marshal
Posts: 59145
180
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to the Ranch.
Please don't post the same question twice.
 
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Followups go here please.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!