B4Coder
0%
LessonAbout 7 min

Chapter 8 · Lesson 4 of 5

04. Private fields, getters and setters

Make fields private so only the class's own methods can change them, and give other code getters and checked setters instead.

Opening the lesson…