835 B
835 B
About this kata
This kata refers to the book Effective Java by Joshua Bloch. It addresses
Item 1: Consider static factory methods instead of constructors.
Problem description
Provid a class that Use factory method to construct an instance by a good understandable name. The instance shall be only created when there is no existing one.
advantages of factory method usage instead of constructors: