Can a class implement multiple interfaces? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can a class implement multiple interfaces?

Interface

27th Feb 2020, 4:47 AM
gpatblount
gpatblount - avatar
2 Answers
+ 2
That is how you achieve multiple inheritance in Java. Abstract classes need not provide the implementation for the methods in interface it is implementing. But you have to implement all the methods of interface if it's a concrete class that is implementing it. Also do what ~ swim ~ has mentioned because you tend to forget things if you don't use it for some time.
27th Feb 2020, 5:44 AM
Avinesh
Avinesh - avatar
+ 1
if you are talking about java, then yes. a class can implement multiple interfaces but it can only extend 1 abstract class.
27th Feb 2020, 9:07 PM
Shen Bapiro
Shen Bapiro - avatar