its all pass by reference. nothing is passed by value in Java unlessits a primitive datatype, such as int.Be careful.If you do not intend to alter the variable which was passed, make acopy of it.