CHAPTER 52 — More About Polymorphism

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.

created: 2/20/99; revised: 7/16/99, 01/24/00, 07/22/02, 06/05/03

CHAPTER 52 — More About Polymorphism

This chapter continues the discussion of polymorphism begun in the previous chapter. Recall that polymorphism is when a reference variable may at different times in a program refer to objects of different (but related) classes.

Chapter Topics:

  • Signature of a method
  • Overriding abstract methods
  • Arrays of related objects
  • The Object class
  • The instanceof operator

QUESTION 1:

(Review: ) What is a method's signature?