Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeLanguages
Java
jls21
Variables of Reference Type

Java Language Specification, Version Java SE 21 Edition
4.12.2. Variables of Reference Type

Read this Section of the Authoritative Specification

https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.12.2

6 Documented Misconceptions

Misconception
MultiReferenceVariable
A reference variable can point to multiple objects
Misconception
ReferenceIntoStack
References can point into the stack
Misconception
ReferenceToVariable
References can point to variables
Misconception
SubtypeCompatibleWithSupertype
A variable of a subtype can reference an object of a supertype
Misconception
SupertypeIncompatibleWithSubtype
A variable of a supertype cannot reference an object of a subtype
Misconception
VariablesHoldObjects
A variable of a reference type contains a whole object

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors