Interface contains the declaration of methods only and we can declare this method also inside our own class.So what is the need once declare a method inside the interface and then implement it into a class?

Questions by amitdwi

Showing Answers 1 - 1 of 1 Answers

thakurshiv

  • Feb 9th, 2007
 

Interface is a contract to your follower of the interface. So if anyone want to implement your iterface he has to follow your method with the same signature nothing else.But main use of interface one can see when client acessing your interface, in respect of versioning, because if one change or addition the method name of the interface one has to update this into the client part as well.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions