I have seen this at many places. a Parent class has a static method to create objects of the right subclass and at times we have a dedicated factory class with instance methods to create object of various subclasses.
Which one is used in which scenario ?
Like static factory methods of InetAddress in java.net to create subclasses of InetAddress Vs BorderFactory class to create various Borders.