Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is String Pass by value of Pass by reference?

807589Jul 24 2008 — edited Jul 24 2008
Hi All,
In java, if we pass the primitive types to the functions, it is an pass by value. And if we pass the Objects to the functions, it is an pass by reference. But if I pass the String whether it is an Pass by value or pass by reference? And please tell me why?



Thanks in advance,
Sathish
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2008
Added on Jul 24 2008
7 comments
248 views