+ 1
What is the use of interface as the same methods are defined on another class and only the declaration happens in interface?
I think it is not needed since we can declare a method directly without using interface. If any other hidden concepts of interface are available please clarify me.
7 Respostas
+ 2
Because you can do
IExample foo = new ExampleImpl1();
foo = new ExampleImpl2();
+ 2
Sure it has. For example, you could do IConnection or something like that.
+ 2
You can define IConnection as an interface for different kinds of internet connections.
+ 1
please read my question clearly
+ 1
i think this may not have required advantages
+ 1
Iconnection means???