PPT Slide
Entities In Inheritance Relationships
Interface - A name and specification for a set of method signatures which is associated with that name.
[Class Modifiers] interface InterfaceName
[extends Interface1, Interface2 …]
{Interface Method Specifications}
public interface MyInterface
{ public void aMethod() }
public interface Comparable
{ public int compareTo(Object O) }
interfaces can not define instance variables but can define constants.
interfaces do not have constructors.
Instances of interfaces cannot be created.
Method signatures in interfaces cannot have the “static” attribute.