Interfaces in java
interface
 Interface Is like class ,interface can have method and variable.
 Method declared in interface are by default abstract.
 Solution for multiple inheritance
 Uses keyword “interface” .
 A class that implements an interface must implement all methods declared
in the interface
syntax
Interface <interface_name>
{
//declare method
}
To implement an interface in Java, you
need to follow these steps:
 1. Declare the interface
 2. Implement the interface
Class vs interface
Class interface
Can declare method Can declare method
Can define method Cannot define
Can create objects Cannot create objects
Thankyou

interface.pptx