Book 3

Object-Oriented Programming

Contents at a Glance

  1. Chapter 1: Understanding Object-Oriented Programming
    1. What Is Object-Oriented Programming?
    2. Understanding Objects
    3. Understanding the Life Cycle of an Object
    4. Working with Related Classes
    5. Designing a Program with Objects
    6. Diagramming Classes with UML
  2. Chapter 2: Making Your Own Classes
    1. Declaring a Class
    2. Working with Members
    3. Using Getters and Setters
    4. Overloading Methods
    5. Creating Constructors
    6. Finding More Uses for the this Keyword
    7. Using Initializers
    8. Using Records
  3. Chapter 3: Working with Statics
    1. Understanding Static Fields and Methods
    2. Working with Static Fields
    3. Using Static Methods
    4. Counting Instances
    5. Preventing Instances
    6. Using Static Initializers
  4. Chapter 4: Using Subclasses and Inheritance
    1. Introducing Inheritance
    2. Creating Subclasses
    3. Overriding Methods
    4. Protecting Your Members
    5. Using this and super in Your Subclasses
    6. Understanding Inheritance and Constructors
    7. Using final
    8. Casting Up and Down
    9. Determining an Object’s Type
    10. Poly What?
    11. Creating Custom Exceptions
  5. Chapter 5: Using Abstract Classes and Interfaces
    1. Using Abstract Classes
    2. Using Interfaces
    3. More Things You Can Do with Interfaces
    4. Using Additional Interface Method Types
  6. Chapter 6: Using the Object and Class Classes
    1. The Mother of All Classes: Object
    2. The toString Method
    3. The equals Method
    4. The clone Method
    5. The Class Class
  7. Chapter 7: Using Inner Classes, Anonymous Classes, and Lambda Expressions
    1. Declaring Inner Classes
    2. Using Static Inner Classes
    3. Using Anonymous Inner Classes
    4. Using Lambda Expressions
  8. Chapter 8: Working with Packages and the Java Module System
    1. Working with Packages
    2. Putting Your Classes in a JAR File
    3. Using Javadoc to Document Your Classes
    4. Using the Java Module System