-
Notifications
You must be signed in to change notification settings - Fork 0
HOME
Saurabh Kumar Ojha edited this page Feb 1, 2021
·
1 revision
CHAPTER 1: CREATING AND DESTROYING OBJECTS
ITEM 1: Consider static factory methods instead of constructors.
ITEM 3: Enforce the singleton property with a private constructor or an enum type.
ITEM 4: Enforce noninstantiability with private constructor.
ITEM 5: Prefer dependency injection to hardwiring resources.