0

What is the use of interface?

19th Sep 2016, 1:08 AM
Pushpendra singh lodhi
Pushpendra singh lodhi - avatar
4 Answers
+ 3
java Doesn't Support Multiple Inheritance directly.. we can Extend only one class At a time.. to over come this problem we Use Interface.. Because One interface Can Implements Many Interface.
6th Nov 2016, 6:32 PM
Mukesh Kumaar
Mukesh Kumaar - avatar
0
Interface just forces a class to have some methods. That's it I think. I know how to use interfaces but I don't know what they are actually used for. Sorry :D
27th Sep 2016, 8:39 AM
MM1132
MM1132 - avatar
0
interface are evolved from one of the basic concept of oops i.e. Abstraction. interface helps to provide a good desing architecture. when you dont know about method detail but you know that this kind of method must be implemented then at the design level interfaces are helpful. they restrict the implementor to implement all the method of interface.
27th Sep 2016, 3:36 PM
Balwant
0
Interface can be defined as a set of protocols. If you are implementing an interface that means you have to obey the protocols, i.e. you have to define the methods.
6th Jan 2017, 6:21 AM
Dhruba Jyoti Dawn