What is multiple interface in java? And when do we use it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is multiple interface in java? And when do we use it?

14th Mar 2019, 10:30 AM
Suraj Bhandarkar
Suraj Bhandarkar - avatar
1 Answer
+ 1
In general, an interface is a device or a system that unrelated entities use to interact. ... Unlike a class, an interface never implements methods; instead, classes that implement the interface implement the methods defined by the interface. A class can implement multiple interfaces.. we are used Most people use multiple-inheritance in the context of applying multiple interfaces to a class. This is the approach Java and C#, among others, enforce. C++ allows you to apply multiple base classes fairly freely, in an is-a relationship between types. So, you can treat a derived object like any of its base classes.
16th Mar 2019, 5:30 AM
Rajendra hotta
Rajendra hotta - avatar