why do we need to use interfaces rather than abstract classes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

why do we need to use interfaces rather than abstract classes?

4th Jul 2019, 11:37 PM
Neobby
Neobby - avatar
2 Answers
+ 4
If everything is abstract use an interface. You can generally implement multiple interfaces but most languages don't allow multiple inheritance.
5th Jul 2019, 2:14 AM
Sonic
Sonic - avatar
+ 2
Would you like to give some real time examples of interface and abstract class
5th Jul 2019, 11:20 AM
Neobby
Neobby - avatar