Why can i have only one instance of Calendar object

后端 未结 4 2079
故里飘歌
故里飘歌 2020-12-06 04:15

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 documentat

4条回答
  •  甜味超标
    2020-12-06 05:00

    Did you think that it is a singleton because it has a getInstance() method? That's not the case!

    getInstance() returns a new instance each time.

提交回复
热议问题