Extends Java Keyword

Compiled By Unknown - No Comments
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.
  • 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−
  • Examples
    public class Rectangle extends Polygon
    {
    }


    Tags:

    No Comment to " Extends Java Keyword "