how do abstract classes like NumberFormat call the methods from their subclasses?

according to Shaad's question about the private constructors, I had tried a small program that makes us access the object of a class that has all the constructors private
this is it

but even if the class constructors are private we could create the object of the class and could access it from outside the class
that also using the static method of the class like this

but in case of abstract classes those are in the java docs I mean classes like NumberFormat, DateFormat etc
we cannot instantiate them even in they are in the same class i.e. because they are abstract
then how can we use the instantiation method like above to get the object of the class?
like this

how is it done in the inbuilt classes ?
please help me

SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right

does that mean that we are getting the instance of the class that extends the abstract class ?
and with the use of polymorphism?
means
DateFormat is referring to the subclass?
I will try to write a program for that definityly

I was checking for that
and found out something
like we instantiate DateFormat class as follows

as the DateFormat class is abstract and the object is of the subclass that extends the DateFormat class
I tried the program to check whether we can do it manually or not
when I run the program given by Ankit sir
that gives the name of the class is SimpleDateFormat

I tried that method with my code and got some similar results for my classes
here is it

My question here is
is this the way DateFormat and NumberFormat classes are created while creating java?
or is this the way that can resemble to that way?
Expecting help from Ankit sir and the great Henry sir

Prasad Kharkar wrote:according to Shaad's question about the private constructors, I had tried a small program that makes us access the object of a class that has all the constructors private
this is it

but even if the class constructors are private we could create the object of the class and could access it from outside the class
that also using the static method of the class like this

but in case of abstract classes those are in the java docs I mean classes like NumberFormat, DateFormat etc
we cannot instantiate them even in they are in the same class i.e. because they are abstract
then how can we use the instantiation method like above to get the object of the class?
like this

how is it done in the inbuilt classes ?
please help me

At first when you calling this static method, The private constructor is getting invoked inside the class, so it is legal, and then it is returning the object to the caller..
the static method() is analogous to getInstance() method...