Objects are passed by value or by reference?

Q

Objects are passed by value or by reference?

✍: Guest

A

Java only supports pass by value. With objects, the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same object .

2013-05-17, 1889👍, 0💬