how to inherit from multiple class

前端 未结 5 755
自闭症患者
自闭症患者 2021-02-09 17:59

Let\'s say i have a griffon object that needs to be part of the felidae and bird class.
How do i do it ?
I can only make it inherit from 1 class at a time...

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-09 18:24

    You can't, per se. But you can have references to as many other objects as you need and you can use multiple protocols.

提交回复
热议问题