While studying Java with books, I am studying by searching for the parts I want to know more. In the book, the access controller public protected package-private private It says there's something In Jump to Java, There is default instead of package-private I want to know the difference between the two.
java
It's a difference of expression.
It is expressed as default
accessor by specifying an accessor without any keywords, and it is only expressed as package-private
accessor because it can only be accessed from the package.
If you look at https://docs.oracle.com/javase/specs/jls/se10/html/jls-6.html#d5e10050, it is expressed as package-access
.
I'm using the term package accessor.
© 2024 OneMinuteCode. All rights reserved.