是的,假设
setPotential
是一个典型的setter,因为
updateAccountPotential
是对对象的引用。该方法修改对象的状态(通过
定电位
)(大概)。就好像你这样做了:
AccountModel a = /*...get the account model...*/;
AccountModel b = a;
b.setPotential(/*...*/);
// Both `b` and `a` refer to the same object, and so the state of that object
// is visible whether you go through `b` or `a` to get to it