3 ms·
I was surprised either. What I find odd: "protected" stuff can be accessed by classes in the same package, even if they not inherit the class with the "protect
by chopin 9y ago
I was surprised either. What I find odd:
"protected" stuff can be accessed by classes in the same package, even if they not inherit the class with the "protected" member. I find this very annoying as I use protected and package-private for entirely different semantics.
No scope qualifier means package-private for classes and public for interfaces. I never could wrap my head around this. That's bad user interface design. As well, I have package-private interfaces sometimes (which is perfectly possible), but their methods can only be public (which is unwanted if the interface is package-private).