What is Interface in Java? Explain
Similar to class, an interface in Java is a reference type. An interface contains abstract methods, constants, static methods, default methods and nested types.
A class implements an interface and inherits the abstract methods of the same interface. Writing an interface is like writing a class.