Does Java pass arguments by value or reference?
Submitted by: AdministratorPass 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online Advanced Java Job Interview Questions And Answers
Top Advanced Java Questions
☺ | In spring bean class uses singleton or prototype? |
☺ | What is jsp life cycle? |
☺ | What is prototype? |
☺ | Explain servlet life cycle? |
☺ | What is AOP(assepct oriented programing)? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |