Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeLanguages
Java
jls21
final Variables

Java Language Specification, Version Java SE 21 Edition
4.12.4. final Variables

Read this Section of the Authoritative Specification

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

3 Documented Misconceptions

Misconception
FinalReferenceImpliesImmutability
An object referred to by a final variable is an immutable object
Misconception
ImmutableRequiresFinalParameters
Immutable classes need final constructor/method parameters
Misconception
PrivateFieldsImplyImmutability
A class where all fields are private is immutable

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors