How pass by reference work in java