Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dan's GC Question Doubt

 
Jas Oberai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I've this doubt with Dan's G.C question:


My Question,Why doesn't "ba" value refer to the same object as "b"??? Is it because its a
"pass_by_value",but dont we use "pass_by_reference" in case of objects.Please help me guys.
Thanks
 
Amit Das
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java we dont have pass-by-reference at all......
suppose,


i hope this is clear enough.....if not, feel free to get back

thanx
amit
 
Jas Oberai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Amit..for that nice and concise explanation.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!