Event though a constructor is a fairly standard and natural way of creating instances of a class, there are other ways to do it. And they might be sometimes better suited to do the job that needs to be done. You ill find this pattern in many libraries API, just think of Integer.valueOf() or getInstance(). All […]
Read moreConsider static factory methods instead of constructors
