Hello everyone,
I ahve one question. Calender class in
java is abstract class. But if you want to use it then you are creating its instance using
Calendar rightNow = Calendar.getInstance();
Here is the few lines which are in help on Suns site:
A
Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style (for example, Japanese-Gregorian, Japanese-Traditional). Calendar defines the range of values returned by certain fields, as well as their meaning. For example, the first month of the year has value MONTH == JANUARY for all calendars. Other values are defined by the concrete subclass, such as ERA and YEAR. See individual field documentation and subclass documentation for details.
The method details:
getInstance
public static
Calendar getInstance()
Gets a calendar using the default time zone and locale. The Calendar returned is based on the current time in the default time zone with the default locale.
Returns:
a Calendar.
Here is my question:
(1) If the Calender class is abstract how it clould be possible to create a
calender object???
Can anybody give me the exact explanation about this? How to create a object of the abstract class. or how the calender object create here???
Malhar