Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Android 中,我看到一个名为 的类SharedPreferences.Editor,它为数据操作提供了一个接口。
SharedPreferences.Editor
现在我的问题是:为什么类名有一个 name.name 结构?这是什么意思?
它是一个内部类,没有绑定到外部类的实例——这意味着它不能访问外部类的非静态成员,因为没有实例。这用于不需要外部类的实例或者它不可用的情况。