Chapter 6
Q1) What is encapsulation?
A) Encapsulation is the way we pack our variables, code, and methods in a manner that exposes just the parts and functionality we want to the parts of our app (or any app that uses our classes) that we want.
Q2) I don't get all this, and actually, I have more questions now than I had at the start of the chapter. What should I do?
A) You know enough about OOP to make significant progress with games and any other type of Java programming. If you are desperate to know more OOP right now, there are plenty of highly rated books that discuss nothing but OOP. However, practice and familiarity with the syntax will go a long way to achieving the same thing and will probably be more fun. The deciding factor in whether you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access