I guess java does not have the option “pass by reference” .But why ? Because sometimes it is very needed.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Any time you feel the need to pass a value by reference, instead pass a reference by value. While Java does not have a “pass by reference” mechanism, it does have references. So just pass those references by value.