In Jaava, when declaring a class as a subclass of another class, the extends keyword is used. Here is an example:
class A { int value; void doSomething() { } } class B extends A { }
In the above example, class B is a subclass of class A. In other words, class A is a super class of class B. As a sub class, class B inherits (extends) variables and methods declared from class A.
The extends keyword is also used to make an interface extends another interface, for example:
interface Animal { } interface Reptile extends Animal { }
Related keyword: class, interface and implements. See all keywords in Java.