what is the advantage of interface over abstract classes?

前端 未结 9 1887
野的像风
野的像风 2021-02-01 05:48

In Java, abstract classes give the ability to define both concrete and abstract methods whereas interfaces only give the ability to implement abstract methods. I believe overrid

9条回答
  •  [愿得一人]
    2021-02-01 06:27

    An class may implement several interfaces, whereas it may only extend one class (abstract or concrete), because Java does not support multiple inheritance.

提交回复
热议问题