posted 11 years ago
Those fields are intended to find the field to change. The method looks something like thisSo when you pass MONTH, it finds the month field and returns it. And of course, as we all know, JANUARY = 0. A Date object doesn’t store those particular fields, but would have to calculate them from its long field, which is a sort of timestamp in milliseconds since 1st January 1970. I don’t know whether a Calendar object stores its data as separate fields, or calculates those values when they are required. Not that it matters which.