Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic