concept reassignment in category java

This is an excerpt from Manning's book Java SE 11 Programmer I Certification Guide MEAP V03.
Exam objectives covered in this chapter
What you need to know
[6.2] Define the structure of a Java class
Structure of a Java class, with its components: package and import statements, class declarations, comments, variables, and methods.
Difference between the components of a Java class and that of a Java source code file.
[6.1] Declare and instantiate Java objects, and explain objects' lifecycles (including creation, dereferencing by reassignment, and garbage collection)
Understanding the differences between variable declaration and initialization, instance creation and its accessibility.
Garbage collection in Java. Determining when instances are eligible to be garbage collected.
[6.3] Read or write to object fields.
Object fields can be read from and written to by directly accessing instance variables and calling methods.
The correct notation to call methods on an object.
Methods may or may not change the value of instance variables.
Access modifiers affect access to instance variables and methods that can be called using a reference variable.
Non-static methods can’t be called on uninitialized reference variables.
Figure 3.6 Objects can be dereferenced by reassignment of variables.
![]()
Exam Tip An instance is dereferenced by reassignment when a variable is either explicitly set to null or is assigned another instance or reference variable.

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.
[2.4] Explain an Object’s Lifecycle (creation, “dereference by reassignment” and garbage collection)
An object can become inaccessible if it goes out of scope or is dereferenced by reassignment.
Figure 3.10. Objects can be dereferenced by reassignment of variables.
![]()