An example of inheritance in Java