01Chapter 1: Classes as definitions, objects as instancesA Java program often needs to work with things such as books, bank accounts, or game characters. A class describes a kind of thing the program can work with. An object is one thing created from a class.5 min read
03Chapter 3: Creating objects with new and accessing membersA class describes a kind of object. An object is a separate item made from that description. For example, a Lamp class can describe lamps, while each lamp object has its own color and brightness.6 min read
05Chapter 5: Initializing objects with constructorsA new object needs a starting state. A bank account might start with a balance, or a plant might start with a name and a height. In Java, a constructor sets up that starting state when you create the object.5 min read
06Chapter 6: Overloading constructors and delegating with thisA constructor is the part of a Java class that sets up a new object. An object is a single instance of a class. When you create an object with new, Java calls a constructor for that class.5 min read
07Chapter 7: Controlling access to object stateA class is a definition for making objects. An object is one item made from a class. A field is a variable that belongs to an object. Together, its fields hold its state: the information the object stores.6 min read
08Chapter 8: Validating constructor arguments and preserving invariantsA constructor is the special part of a class that sets up a new object. It can receive an argument, which is a value supplied by the caller. For example, a bank account constructor might receive a starting balance.5 min read
09Chapter 9: Class-level state and behavior with staticA Java class is a definition for a kind of object. An object is one instance, or individual example, of that class. A field is a variable stored as part of a class or object. A method is a named block of code that performs a task.6 min read
11Chapter 11: Field and constructor initialization orderWhen you create an object, Java does not fill in all its fields at once. It follows an order. Knowing that order helps you understand field values and avoid using a field before it is ready.5 min read
12Chapter 12: Comparing object identity and logical equalityTwo Java objects can hold the same information without being the same object. This difference matters when you compare values, search a collection, or decide whether an item is already present.5 min read
13Chapter 13: Designing immutable objectsAn immutable object is an object whose state cannot change after it is created. Its state is the data stored in its fields.5 min read