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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.