It's not Factory
classes vs other classes, but Factory
methods vs. using constructors. If you use a constructor to create an object, you must know its exact class. If you use a factory method to create one, then you only need to know a superclass or interface. For example, think about
JDBC code. You work with objects that implement Connection and Statement and ResultSet interfaces, but you don't actually know the names of the concrete classes that are implementing them, because all the objects come from factory methods. This is good, because every JDBC driver has its own set of implementations of these interfaces. Because JDBC is set up with factory methods, you can write code which works with any driver -- the actual class names of the driver implementation classes are not hard-coded into your application.