Introduction: Debugging Interlude—Common Mistakes with Classes

Here are the prerequisites, learning objectives, and overview for this debugging interlude.

We'll cover the following

Prerequisites

Objectives

After completing this debugging interlude, you should be able to:

  • Identify errors you make when using a class from the Java Class Library
  • Find and correct any mistakes in the definition of a class that you define
  • Find and correct any errors in the use of a class that you define
  • Define constructors correctly

Overview

We have just explored the basics of creating and using our own classes, as well as using classes written by someone else. These are major components of object-oriented programming.

Before we introduce additional Java features, let’s take a short break to continue our exploration of debugging. Whether you are writing your own class or using one from the Java Class Library, mistakes can happen. In this interlude, we will consider some common mistakes that you are apt to make while using or defining classes.

Get hands-on with 1200+ tech skills courses.