6
Methods, Interfaces, Records, and Their Relationships
In Java, how we define and organize our code is the cornerstone of the language. In this chapter, we will begin by examining the role that a method plays in Java. From here, we will examine the relationships afforded by inheritance and interface. The immutable record class is next up. Polymorphism, the ability to use objects in a hierarchy of classes, as it applies to inheritance and interface, is covered next. We will finish the chapter by looking at the relationships between objects and how they can call upon methods in other objects.
We will learn about the following topics in this chapter:
- Understanding methods
- Understanding inheritance
- Understanding the class interface
- Understanding ...
Get Transitioning to Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.