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.
我有课
public Class Xyz { const const1 = '1' const const2 = '2' }
我可以做一些我可以限制这个类只能从类说 Class2 调用的事情吗
您可以使该类的所有功能和属性受到保护,而 class2 可以扩展 class1。