In Oracle Java documentation on Gregorian calendar, it gave an example:
// create a GregorianCalendar with the Pacific Daylight time zone
// and the current date and time
Calendar calendar = new GregorianCalendar(pdt);
I understand the the GregorianCalendar
is a subclass of Calendar
abstract class.
What I don't understand from the example is why it did not write the code as such:
GregorianCalender calendar = GregorianCalendar(pdt);