Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeLanguages
Java
jls21
Determining Accessibility

Java Language Specification, Version Java SE 21 Edition
6.6.1. Determining Accessibility

Read this Section of the Authoritative Specification

https://docs.oracle.com/javase/specs/jls/se21/html/jls-6.html#jls-6.6.1

4 Documented Misconceptions

Misconception
PrivateAccessibleInSubclass
Private members of a superclass are accessible from a subclass
Misconception
PrivateFromOtherInstance
An object cannot access private members of other objects of the same class
Misconception
PrivateFromStatic
Static methods cannot access private members of instances of same class
Misconception
PrivateMeansFinal
A private field cannot be changed

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors