I was just wondering…
why can i have only one instance of Calendar object. Is there a reason for it to be a singleton?
I have tried to read the documentation but they didn’t mention why this is needed. And a quick google search didn’t give me any answers.
Calendar is not a singleton, it is an abstract class. The
getInstancemethod is a Factory method that returns a concrete implementation of the Calendar class.Search Google for java.util.Calendar source code, and you will see how it works.