Strange behaviour with GregorianCalendar

后端 未结 8 1812
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 22:34

I just encountered a strange behaviour with the GregorianCalendar class, and I was wondering if I really was doing something bad.

This only appends when the initiali

8条回答
  •  盖世英雄少女心
    2021-01-01 23:18

    The reason should be, that MONTH has an enumeration-like logical structure. You can easyly fill and read Arrays/Collections/Lists. Due to internationalization it has to be enumeratable (indirect access). DAY is just an direct accessible Integer. That's the difference.

提交回复
热议问题