The Startup
Published in

The Startup

Java Packages and the Single Responsibility Principle

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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store