| Author |
Java - pass by value and pass by reference
|
marlajee Borstone
Ranch Hand
Joined: Jun 26, 2008
Posts: 35
|
|
Hi friends, I find this site as great site to increase knowledge. Thanks to JavaRanch !! As I am stuck today as I could read somewhere Java supports only Pass-by-value and not pass-by-reference. Can someone prove it that Java does not support Pass-by-Reference. I want to see some java beginner level code example for proof. regards, Dhaansumall
|
 |
Mark Vedder
Ranch Hand
Joined: Dec 17, 2003
Posts: 624
|
|
This question gets asked a lot. Take a look at this and this recent threads on the subject. You can also search the beginner forum for pass by value and find a number of discussions on the subject.
|
 |
Mark Vedder
Ranch Hand
Joined: Dec 17, 2003
Posts: 624
|
|
You can also take a look at the Pass By Value campfire story (a fun name for a lesson) here at JavaRanch. It does a nice job of explaining the concept, and has some examples. Things get a little more confusing when dealing with objects and references to objects. The campfire story can help clear things up. [ July 26, 2008: Message edited by: Mark Vedder ]
|
 |
 |
|
|
subject: Java - pass by value and pass by reference
|
|
|