Effective Java - Item 1. Consider Static Factory Methods Instead of Constructors
By providing static factory methods and using them instead of constructors, code related to instance creation can be made easier to understand.
By providing static factory methods and using them instead of constructors, code related to instance creation can be made easier to understand.
Key summaries and notes for Effective Java
If a constructor has many parameters, using the builder pattern is more convenient.
Enforce singleton characteristics with a private constructor or an enum type.