how to create a subclass in java

Java
class Super {
    Number aNumber;
}
class Sub extends Super {
    Float aNumber;
}

Source

Also in Java: