Java Packages and the Single Responsibility Principle

Alonso Del Arte
The Startup
Published in
13 min readAug 27, 2020

--

Photo by 🇨🇭 Claudio Schwarz | @purzlbaum on Unsplash

The S in the famous (or infamous) SOLID acronym stands for the single responsibility principle (which itself has its own acronym, SRP). It means an entity should have only one single responsibility, and no others.

A good and common example of something that does not follow SRP is a function or procedure (“method,” in Java parlance) that does two different things that…

--

--

Alonso Del Arte
The Startup

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified