Adding Days to Calendar

后端 未结 4 1385
独厮守ぢ
独厮守ぢ 2021-01-05 07:08

I\'m new to this site and I have just started learning Java. I\'m trying to add couple days to the GregorianCalendar but it doesn\'t work. Here... (Ignore the top chunk), it

4条回答
  •  再見小時候
    2021-01-05 07:24

    Calendar c = new GregorianCalendar(2000, Calendar.JANUARY, 1);
    c.add(Calendar.DAY_OF_MONTH, 1);
    

    More info on Calendar and its fields can be found here Calendar

    Also try to look at this past post: here

提交回复
热议问题