why do we need to use interfaces rather than abstract classes? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

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

4th Jul 2019, 11:37 PM
Neobby
Neobby - avatar
2 Respostas
+ 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