Originally posted by Thomas Whalen:
i am wondering why you would want to instantiate from the Calendar class ... why not just do this?:
GregorianCalendar myCalendar = new GregorianCalendar();
You are not actually instantiating the Calendar class. You are instantiating the GregorianCalendar class and assigning it to a Calendar reference.which makes it more flexible for use in
polymorphism.
However, only methods are involved in polymorphism, not fields. So in this case it is hard to point out the usefulness of this feature using only the code presented here.
Not only that, but it wouldn't solve the problem at hand.
[This message has been edited by Marilyn deQueiroz (edited November 25, 2001).]