Effective Java: Singletons
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.