Exact use of Abstract class

后端 未结 4 1563
独厮守ぢ
独厮守ぢ 2020-12-05 11:06

What is the exact use of an Abstract class? Is not possible to do the same things in an ordinary class as it is an an abstract class?

4条回答
  •  盖世英雄少女心
    2020-12-05 11:42

    Unlike regular classes, abstract classes can contain abstract methods. They act much like interface members.

    Meanwhile, they can do just about everything else that regular classes can do: they can implement methods, contain fields & nested types, derive from another class, etc.

提交回复
热议问题