Why does the “protected” modifier in Java allow access to other classes in same package?

This design is based on the idea that the package is the appropriate unit, maintained and released by one internally consistent team; inheritance relationships have much less to do with who’s maintaining and releasing what when.

Leave a Comment