Playing with pass by ref in java