[Head First Design Patterns] Singleton Pattern
17 Apr 2022Singleton Pattern
- one of a kind object, there is only one instance
- no public constructor, only provide an global point to access an instance
Implementation
- is aware about dealing with multithreading, synchronize
getInstance()
method if needed - source code