2.3. Object reference variables

[2.1] Declare and initialize variables (including casting of primitive data types)

[2.2] Differentiate between object reference variables and primitive variables

The variables in Java can be categorized into two types: primitive variables and reference variables. In this section, along with a quick introduction to reference variables, we’ll cover the basic differences between reference variables and primitive variables.

Reference variables are also known as object reference variables or object references. I use these terms interchangeably in this text.

2.3.1. What are object reference variables?

Objects are instances of classes, including both predefined and user-defined ...

Get OCA Java SE 8 Programmer I Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.