Tell now I have studied that java uses pass-by-value but I am bit confused here
599
Is Java "pass-by-reference" or "pass-by-value"?
91298
What do ref, val and out mean on method parameters?
26683
Returning value that was passed into a method
56606
Why is main() in java void?
15837
Array in Java program bizarre behaviour
67942
Does Java have pointers?
111535
Why does the ArrayList implementation use Object[]?
17184
Are arrays in PHP copied as value or as reference to new variables, and when passed to functions?
65815
How to pass a value from one Activity to another in Android?
127055
Pass By Value & Reference
19638
What is the purpose of the var keyword and when should I use it (or omit it)?
47542
How come this is happening in java?
129581
Does C++ pass objects by value or reference?
31879
What is the meaning of "this" in Java?
26433
How does variable assignment work in JavaScript?
37883
Java String variable setting - reference or value?
89487
Is it safe to get values from a java.util.HashMap from multiple threads (no modification)?