Qus:    Is Java “pass-by-reference” or “pass-by-value”?
Dec 27, 2021 03:33 1 Answers Views: 560 VAMSI
Prev Next
Answers (1)
JOSHUA Dec 28, 2021 01:07
Answer:   Java is officially always pass-by-value.That is, for a reference variable, the value on the stack is the address on the heap at which the real object resides. When any variable is passed to a method in Java, the value of the variable on the stack is copied into a new variable inside the new method.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect