scala中抽象类
抽象类 (Abstract Class)
In the Scala programming language, abstraction is achieved using abstract class.
在Scala编程语言, 抽象是使用抽象类来实现的。
Abstraction is the process of showing only functionality and hiding the details from the final user.
抽象是仅显示功能并向最终用户隐藏细节的过程。
Abstract classes are defined using the "abstract" keyword. An abstract class contains both abstract and non-abstract methods. Multiple inheritances are not allowed by abstract class i.e. only one abstract class can be inherited by a class.
抽象类使用“抽象”关键字定义。 抽象类包含抽象方法和非抽象方法。 抽象类不允许多重继承,即一个类只能继承一个抽象类。
Syntax to create Abstract Class in Scala:</