A named constructor can only generate the instance of the current class. A factory constructor can decide which instance to return on runtime, it can return either the instance of the current class or any of the instances of its descendants class.
What is named factory and default constructors?
A named constructor can only generate the instance of the current class. A factory constructor can decide which instance to return on runtime, it can return either the instance of the current class or any of the instances of its descendants class.