Beginner module
Module 5: Classes, Objects, and Constructors
Start thinking in Java objects by creating classes, storing state in fields, using methods, and building objects with constructors.
Module lessons
Module 5: Classes, Objects, and Constructors
0/5 complete0% complete
01
What a Class Is and What an Object Is
Learn the basic class-and-object model so Java programs can represent real things instead of only printing values.
14 min
Next
02
Fields and Methods
Give your classes state with fields and behavior with methods so they can model something useful.
16 min
Ready
03
Constructors
Use constructors to create objects with sensible starting values instead of manually filling every field after creation.
18 min
Ready
04
Object State and the `this` Keyword
Use `this` to refer to the current object and make constructor or method code easier to read.
14 min
Ready
05
Encapsulation and Getters/Setters
Protect object state by hiding fields and exposing controlled access through methods.
18 min
Ready
Advertisement