Protected access in Java should be used very sparingly
5 min readApr 2, 2024
Yesterday I was reviewing a Java program of mine that I’ve been working on a few years now. A friend of mine, who is quite proficient with Swift, asked me about the protected access level in Java.
In that very moment I realized that my choice of access level all those years ago had been wrong, and also that following the single responsibility principle generally leads to…