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
what is meant by JRMP?
Describe, in general, how java's garbage collector works?
what are the advantages of JTA over JTS?
What class is used to create Server side object ?
What is mdb and what is the special feature of that?
What restrictions are placed on the location of a package statement within a source code file?
Why do threads block on i/o?
Explain RMI Architecture?
What is Stream Tokenizer?
Explain the steps in details to load the server object dynamically?
Describe activation process?
What class is the top of the awt event hierarchy?
What is the form of storage space in java?
Why a client should be multithreading? Explain.
What is the difference between the session.update() method and the session.lock() method?