Semantics of “extends” and “implements.”
extends - classes: The “extends” specification applied to class definitions states that
the “extended” class “inherits” the instance variables and methods
A class can “extend” or “inherit from” only one other class.
public class MyClass extends YourClass
/* The instance variables of YourClass are a part of the state of MyClass and
the methods of YourClass can be invoked on instances of MyClass. */
extends - interfaces : The “extends” specification applied to interface definition
states that the extended interface includes the method signatures defined
in the extending interface.
An interface can extend or “inherit from” any number of other interfaces.
public interface Comparable extends Clonable
/* Comparable includes the method signatures specified in Clonable. */