1.setter/getter set方法与get方法中如果要用到变量,不能直接引用,需要用field字段来代表当前变量,否则会死循环 转自:https://www.jianshu.com/p/ca8f06c2a293