01Chapter 1: Encapsulation: State, Behavior, and InvariantsAn object often needs to remember information and change it over time. A bank account, for example, remembers a balance. Deposits and withdrawals change that balance.7 min read
02Chapter 2: Packages and Where Access OccursA Java program can contain many classes. A package is a named group of related Java types, such as classes. Packages help you organize those classes and tell Java which class you mean when names are similar.7 min read
03Chapter 3: Public, Protected, Package-Private, and PrivateJava access modifiers control where code can use a class member. A member is a field, method, or constructor declared in a class. Access modifiers help you decide which parts of a class other code can use and which parts stay inside it.7 min read
04Chapter 4: Access Modifiers for Classes and MembersA Java program can contain many classes, but not every class needs to be available everywhere. The same is true of the fields, methods, and constructors inside a class.7 min read
05Chapter 5: Choosing a Class's Public APIA class often needs to hide some details while giving other code a useful way to work with it. Its public API is that outward-facing part.7 min read
07Chapter 7: Access in InheritanceInheritance lets one Java class build on another. The new class can use suitable behavior from the existing class and add behavior of its own.6 min read
08Chapter 8: Protected Access Across Package BoundariesA protected member gives a subclass access to part of its parent class. But when the subclass is in a different package, Java places an extra limit on how the subclass can use that member.7 min read
09Chapter 9: Access Rules for Overridden MethodsA subclass is a class built from another class, called its superclass. The subclass can replace the behavior of an inherited method. This is called overriding.7 min read
10Chapter 10: Defensive Copying and Mutable StateA private field can still be changed by outside code if it holds an object that the outside code can also reach. This matters when the object is mutable: its contents can change after it is created.6 min read
11Chapter 11: Public Access and Module ExportsA public class is not always available to every Java program. If the class belongs to a Java module, the module also controls which packages other modules can use.8 min read