Details
-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b143
-
generic
-
generic
-
Verified
Description
Currently, JShell does several lines of whining about access modifiers on definitions because they don't make sense in the wrapper world -- but still allows them by ignoring them. But the wrapper world is under the sheets. They cannot access these definitions externally anyhow. Access modifiers (not including static and final) can and should be silently ignored as yet another part of the hidden wrapper magic.
There are many reasons you would see access modifiers including: cut-and-paste from source and examples from tutorials/books.
Thanks Paul Deitel for the discussion that led to this realization.
There are many reasons you would see access modifiers including: cut-and-paste from source and examples from tutorials/books.
Thanks Paul Deitel for the discussion that led to this realization.