Effective Java: Singletons
3 min readDec 24, 2020
--
Time for chapter three of our Effective Java review. Today’s is a fairly simple one. Today we are talking about the singleton pattern. The singleton pattern is quite well known and basically comes down to an object that only allows instantiation once.
So what benefits does a singleton give us?
- Expensive objects can be avoided being generated multiple times.