单项选择题

如何让类中的某些方法无法在类的外部被访问?()

A.把类声明为private
B.把方法声明为private
C.无法实现
D.编写合适的重载方法(overloadingmethod)

热门 试题