Does Java pass arguments by value or reference?
Answer Posted / prs01
Pass by value.
1. When passing primitives, it passes a copy of the
variable to the method. Any change made in the method does
not reflect in the calling method.
2. When dealing with objects, a copy of their
reference/address is passed. Thus the change made to the
object is reflected in the calling method.
Is This Answer Correct ? | 22 Yes | 4 No |
Post New Answer View All Answers
If your ui seems to freeze periodically, what might be a likely reason?
Why doesn’t the focus feature on the tag work in every circumstance?
what are RemoteObjects?
What is Remote Server?
What is table mutation and how do you avoid it?
Are there books about seam?
What are the benefits of detached objects?
What is the difference between a menuitem and a checkboxmenuitem?
What value does read() return when it has reached the end of a file?
Write a singleton program?
which book is better for jdbc ,servlets and jsp
What restrictions are placed on the location of a package statement within a source code file?
Why won’t the jvm terminate when I close all the application windows?
Can we sent objects using Sockets?
how i secure my site with the https protocol.what are the steps?