Because implicit objects are declared automatically, we need only use the reference variable associated with a given object to begin calling methods on it.
因为隐式对象是自动声明的,所以我们只需要使用与一个给定对象相关的引用变量来调用其方法。
If you want to change an immutable object, you don't - you create a new object with the changed value and point your reference to it.
如果您想要改变一个不可变对象的话,您不会改变它,而是使用修改后的值来创建一个新的对象,并把您的引用指向它。
Each type of reference object has different behaviors, and their interaction with the garbage collector varies.
每种引用对象都有不同的行为,而且它们与垃圾收集器之间的交互也有所不同。
应用推荐