O'Reilly logo

NetBeans IDE 8 Cookbook by Rhawi Dantas, David Salter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overriding a method

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 java.lang.Object.

In this recipe, we'll show how NetBeans provides tools to allow developers to easily override superclass methods within a subclass.

Getting ready

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required