Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeLanguages
Java
jls21
Field Declarations

Java Language Specification, Version Java SE 21 Edition
8.3. Field Declarations

Read this Section of the Authoritative Specification

https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.3

5 Documented Misconceptions

Misconception
ConstructorParameterIsField
Formal constructor parameters are equivalent to instance variables
Misconception
RecursiveMethodImpliesRecursiveType
A class with a recursive method represents part of a recursive data structure
Misconception
ReferringToRecursiveStructureMakesRecursive
A class referring to a recursive data structure is (indirectly) part of that recursion as well
Misconception
UntypedVariables
Variable declarations don't need a type
Misconception
UseOfSelfTypeImpliesRecursiveType
If a class has a method that has a local variable, parameter, or return value with the class as its type, the class is a recursive type

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors