Why Caches with Immutable Classes?

Fig 1. The Integer Cache anomaly

Have you ever wondered about the implications of careless designs of Immutable classes and why the immutable classes have an associated cache? Read this article till the end and take your knowledge a little up about immutable classes. And also know about the reasons behind the flyweight

--

--

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
KRISHNA KISHORE V

KRISHNA KISHORE V

Software Architect, Full Stack Developer, Senior Software Consultant, Technical Content Writer, Free Lancer