Why does Calendar.get(Calendar.MONTH) return 0? [duplicate]
why does the following return 0?
int currMonth = c.get(Calendar.MONTH);
The Months are numbered from 0 (January) to 11 (December).
Reference:
Calendar.MONTH
Not natural indexing, but unnatural thinking of Sun people. :-)
oops! sorry - I figured it out. Natural Indexing of course!!!
精彩评论