In changeIt, myBar = new Bar(); is assigning a new instance to the method parameter myBar, not to the instance variable. myBar.barNum = 99 sets the instance variable to 99, because the instance variable was passed to the method (i.e. method parameter = instance variable).