The extends keyword is used in a class or interface declaration to indicate that the class or interface being declared is a subclass of the class or interface whose name follows the extends keyword.
public class Rectangle extends Polygon
{
}
In the example above, the Rectangle class inherits all of the public and protected variables and methods of the Polygon class.
The Rectangle class may override any non-final method of the Polygon class.
A class may only extend one other class.