An interface is used to define the contract that should be implemented into the class.
There are several reson to use interface
1. To allow a class to inherit multiple behaviors from multiple interfaces.
2. To avoid name ambiguity between the methods of the different classes as was in the use of multiple inheritance in C++.
3. To combine two or more interfaces such that a class need only implement the combined result.
4. To allow Name hiding. Name hiding is the ability to hide an inherited member name from any code outside the derived class.
5. To define the skelton of the project.
I.veeresh, if this helps please login to Mark As Answer. | Alert Moderator