Object-oriented development has been shown to be a good development practice. One of the principal aspects of object-oriented development is the ability to override classes. This is defining a method in a subclass that has the same signature as that in a superclass. In Java, all classes are derived from
In this recipe, we'll show how NetBeans provides tools to allow developers to easily override superclass methods within a subclass.
First we will need to create a new project, so please refer to the recipes in Chapter 1, Using NetBeans Projects, for creating Java projects. To help follow this recipe, when creating a project, enter
OverridingMethods as the project name and ensure that a main class ...