Originally posted by Parag S. Kulkarni:
Can anybody tell me in Java, exactly in what kind of situation we have to use interface & not an abstract class?
The typical answer is to achieve multiple Inheritance?
But practically is it the only anwer for that?
Besides this, there is another answer also. That when u implement an interface in several unrelated classes, u can interact with these two classes although there is no physical connection between those(viz. subclass/parent-child relationship). In fact here the term interface comes into existence. It is the interface between two unrelated classes so that they can communicate.
Is it satisfactory?