Interface in real world:
You can see number of interface examples. Let us take example of a TV. You press change channel button of TV remote and channel is changed. Here remote is act as an interface between you and TV.
Dictionary meaning of interface:
A point where two systems, subjects, organizations, etc., meet and interact.
Interface in java:
Interface is a way of implementing 100% abstraction. An interface is declared with interface keyword. It can contain only abstract methods and static final data members Or Interface is a group of related abstract methods.
Java interview questions on interface
- What is interface in java?
- Can we declare an interface method static in java?
- Can an interface be declared final in java?
- What is marker interface?
- How to create custom marker interface?
- What is difference between abstract class and interface in java?