Possible Duplicate:
Is Java “pass-by-reference”?
Pass by value or Pass by reference in Java?
When we pass the arguments to a method inside a java class. Are the parameters passed in By VALUE or BY REFERENCE as default?
There can be two possibilities,
1. if we pass arguments to a method from another method within the same class.
2. if we pass arguments to a method from another class.
Secondly, if i want to pass values by reference (in case default attribute of java is By Value) then what should i do?
Whatever be the case.. Java is PASS BY VALUE and even references are passed by value
and to get more examples here are few interesting links to read out
http://www.javaworld.com/javaqa/2000-05/03-qa-0526-pass.html
How to do the equivalent of pass by reference for primitives in Java
Pass by value or Pass by reference in Java?