The interface makes it possible for a method in one class to invoke methods on objects of other classes, without the requirement to know the true class of those objects, provided that those objects are all instantiated from classes that implement one or more specified interfaces. In other words, objects of classes that implement specified interfaces can be passed into methods of other objects as the generic type Object, and the methods of the other objects can invoke methods on the incoming objects by first casting them as the interface type.
Liked By
Write Answer
Why we use interfaces in java
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
09-Sep-2015