Interface vs Base class

后端 未结 30 2589
甜味超标
甜味超标 2020-11-21 07:34

When should I use an interface and when should I use a base class?

Should it always be an interface if I don\'t want to actually define a base implementation of the

30条回答
  •  别那么骄傲
    2020-11-21 07:51

    Here is the basic and simple definiton of interface and base class:

    • Base class = object inheritance.
    • Interface = functional inheritance.

    cheers

提交回复
热议问题