DateFormat question
I have used code like:
DateFormat df = DateFormat.getDateInstance( );
which according to the API: "Gets the date formatter with the default
formatting style for the default locale". My question is: Since the
DateFormat class is abstract, what is going on behind the curtains? I
have to assume that some un-named but concrete subclass of the
DateFormat class is created, compiled, and instantiated, then assigned
to the df reference variable.
Is this the case?
.
Relevant Pages
- Re: DateFormat question
... formatting style for the default locale". ... DateFormat class is abstract, what is going on behind the curtains? ... It may be an anonymous inner class, it could be a named static nested class, or maybe it is a package scope top-level class that isn't documented in the API. ... If you want to know exactly what happens, the source code is included in the src.zip file that is installed with the JDK. ... (comp.lang.java.programmer) - Re: DateFormat question
... formatting style for the default locale". ... DateFormat class is abstract, what is going on behind the curtains? ... top-level class that isn't documented in the API. ... I see its an instance of SimpleDateFormat ... (comp.lang.java.programmer) - Re: Date parsing bug?!
... >> Look at the API. ... it inherits that from DateFormat. ... DateFormat has method isLenient() which is true by default. ... (comp.lang.java.help) - Re: Date parsing bug?!
... Look at the API. ... it inherits that from DateFormat. ... Steve W. Jackson ... (comp.lang.java.help) - Re: Date parsing bug?!
... > Look at the API. ... > You'll note that SimpleDateFormat doesn't have a method parse. ... it inherits that from DateFormat. ... (comp.lang.java.help) |
|