Java would complain if an abstract class were created using a class instance creation expression. Polymorphism allows a type to have many behaviors. Remember this definition, as we'll come back to it. It is absolutely true that you cannot instantiate an abstract class. Something else is going on here.
Factory methods hide the implementation of the object that they create.
That detail remains hidden from you. Instead, we simply treat the instance as the abstraction DateFormat . Once we have an instance, we use the behavior without worrying about the specific implementation and move on. This is polymorphism in its purest form. By creating different implementations of DateFormat but treating each of them as the superclass, we have a type that displays many different behaviors.