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
Name the eight primitive java types.
whats is mean by connectionpooling
What are the sequence of steps to write pub or sub model kind of application?
Define aop(assepct oriented programing)?
What do you know about seam?
For which statements does it make sense to use a label?
What is metaspace?
Why do I get a duplicate name error when loading a jar file?
Which javutil classes and interfaces support event handling?
How substring() method of string class create memory leaks?
which book is better for jdbc ,servlets and jsp
what is the use of State Factories?
What is the highest-level event class of the event-delegation model?
How will you pass parameters in RMI? Why do you serialize?
Is infobus easy to use?