• Edward Sciore


Each class in a well-designed program denotes a distinct concept with its own set of responsibilities. Nevertheless, it is possible for two (or more) classes to share some common functionality. For example, the Java classes HashMap and TreeMap are distinct implementations of the concept of a "map," and both support the methods get, put, keySet, and so on. The ability of a program to take advantage of this commonality is known as polymorphism. Polymorphism is arguably the most important design concept in object-oriented programming. This chapter explores Java interfaces and how they are used to support polymorphism. 

Copyright information

© Edward Sciore 2019

Authors and Affiliations

  • Edward Sciore
    • 1
  1. 1.NewtonUSA

Personalised recommendations