Chapter 4: Classes
Learning Objectives
After completing this chapter, you should be able to understand the following:
- The difference betwen
public
andprivate
modifiers - Encapsulation and its role in Object-oriented Programming
- Constructors and their relationship with other Java classes
- How to declare and define a new method
- 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
- class
- object
- fields
- methods
- instance
this
keyword
Modifiers in Java
- public
- private
- static
- protected
- world-level
- access level
- access modifier
Encapsulation
- encapsulation
- getter
- setter
Constructors
- default constructor
Methods
- instance method