Chapter 4: Classes

Learning Objectives

After completing this chapter, you should be able to understand the following:

  1. The difference betwen public and private modifiers
  2. Encapsulation and its role in Object-oriented Programming
  3. Constructors and their relationship with other Java classes
  4. How to declare and define a new method
  5. Method overloading

Key Terminology

Throughout this lesson you should make note of the following terms and their definitions as you read the content on the page:

Classes for Java

  1. class
  2. object
  3. fields
  4. methods
  5. instance
  6. this keyword

Modifiers in Java

  1. public
  2. private
  3. static
  4. protected
  5. world-level
  6. access level
  7. access modifier


  1. encapsulation
  2. getter
  3. setter


  1. default constructor


  1. instance method