Static Factory vs Constructors

Generally any class allows clients to create objects by providing a public constructor. There is another technique which every programmer should be aware of. An Static Factory. A class can provide one static factory, method  which is simply an static method which returns object of the class. Note that a static factory method is not the same as the Factory Method pattern from Design Patterns. There are few … Continue reading Static Factory vs Constructors