In this chapter, we will start working with examples on how to code classes and customize the initialization of instances in Java 9. We will understand how classes work as blueprints to generate instances and dive deeply into the garbage collection mechanism. We will:
Understand classes and instances in Java 9
Work with object initialization and its customization
Learn about an object's lifecycle
Introduce garbage collection
Declare classes
Customize constructors and initialization
Understand how garbage collection works
Create instances of classes and understand their scope