Why do we need Interfaces?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I am not able to understand the significance of the interfaces.
Interfaces exposes some behavior through methods, but classes can also expose its behavior through public methods directly, then why do we want to use the interfaces?
is it just for an assurence that all the methods in the interfaces are inplemented in the class? Is there any other reason like performance?
I guess interface object will/can not be created at runtime, is it correct? if so then how does the communication happen at runtime?
any thoughts/links to understand "what an interface is?".
Thanks and Regards,
Benin.

View the full article
 
Back
Top