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.
好吧,当我从另一个类的静态方法中使用我的 getter 和 setter 时,一切都很好,但它会发出警告,表明它应该在静态上下文中使用。因此,当我不使用任何 getter 或 setter 时,它会消除该警告,但还有什么更好用?