• When fields are declared protected, there is the possibility that methods in subclasses will directly access them, effectively increasing the coupling within a class hierarchy.

    字段声明为受保护,子类中的方法可能直接访问它们,这样就可能有效地增加层次结构中的耦合

    youdao

  • This approach makes testing protected methods much easier because the test case class can now extend the class that contains the protected methods.

    这种方法使得测试保护方法非常容易因为测试案例现在可以扩展包含受保护方法类了。

    youdao

  • Sometimes you need to write a subclass (often as an inner class) in order to test protected methods.

    有时需要编写一个子类通常作为内部测试protected方法

    youdao

  • That's why the Vehicle class, and its subclasses, have either private or protected fields, and public setter and getter methods to provide access.

    正是Vehicle及其子类具有 private或者protected属性publicsettergetter方法访问属性的原因。

    youdao

  • This class contains three protected attributes and six methods, as shown in Listing 1.

    此类包含三个受保护属性6个方法如清单1

    youdao

  • The actual class that represents an .aspx page in action is an instance of a class that derives from Page; hence, it can call into protected methods.

    真正代表个 .aspx活动页面是从Page派生个类的实例;因此能够调入受保护的方法。

    youdao

  • The actual class that represents an .aspx page in action is an instance of a class that derives from Page; hence, it can call into protected methods.

    真正代表个 .aspx活动页面是从Page派生个类的实例;因此能够调入受保护的方法。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定