包含一个或多个抽象方法 的类本身必须被声明为抽象的。 If there is any abstract method in a class, that class must be abstract. . 如果一个类包含抽象方法 ,那么该类本身_必须声明为抽象的_,如下所示:. If a class includes abstract methods , then the class itself must be declared abstract, as in. 包含一个或多个抽象方法 的类本身必须被声明为抽象的。 Any class that contains one or more abstract methods must also be declared abstract. . 针对这个问题,Java专门提供了一种机制,名为“抽象方法 ”。 Java provides a mechanism for doing this called the abstract method .
为了提高程序的清晰度,包含一个或多个抽象方法 的类本身必须被声明为抽象的。 For added clarity, a class with one or more abstract methods must itself be declared abstract. . 抽象类(abstractclass)是一个被声明为抽象的类,它可能包含或不包含抽象方法 。 An abstract class is a class that is declared abstract means it may or may not include abstract methods . 任何继承抽象类的子类必须实现父类的所有抽象方法 ,除非该子类也是抽象类。 Subclasses of the abstract class must implement all of the abstract methods , unless it is also an abstract class. 关于如何在Python中使用静态、类或抽象方法 的权威指南. The definitive guide on how to use static, class or abstract methods in Python. 抽象类(abstractclass)是一个被声明为抽象的类,它可能包含或不包含抽象方法 。 An abstract class is a class that is declared abstractit may or may not include abstract methods . 抽象类和接口都用于实现抽象,我们可以声明抽象方法 。 Abstract class and interface both are used to achieve abstraction where we can declare the abstract methods .抽象类(abstractclass)是一个被声明为抽象的类,它可能包含或不包含抽象方法 。 An abstract class is a class that is declared abstract- it may or may not include abstract methods . 抽象类(abstractclass)是一个被声明为抽象的类,它可能包含或不包含抽象方法 。 An abstract class is a class that's declared abstractit might or might not include things like abstract strategies . 所反映的方法可能是类方法或实例方法(包括抽象方法 )。 The reflected method may be a class method or an instance method(including an abstract method ).". 一个被声明为abstract而没有实现的方法称为抽象方法 。 A method that is declared as abstract and does not have implementation is known as abstract method . 当一个类继承了抽象类,则需要子类实现抽象类中的所有抽象方法 。 When a subclass inherits an abstract class, it must implement all of the abstract methods in the superclass. 但是,一个抽象类被允许把接口方法映射到抽象方法 中。 However, an abstract class is permitted to map interface methods onto abstract methods . 例如某个抽象方法 被声明为受保护的,那么子类中实现的方法就应该声明为受保护的或者公有的,而不能定义为私有的。 For example, if the abstract method is defined as protected, the function implementation must be defined as either protected or public, but not private. Abstract classes and abstract methods .Abstract classes and abstract methods .
展示更多例子
结果: 369 ,
时间: 0.0188
English
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt