import java.util.Calendar;public class CalendarTest{?? ?public static void main(String[] args){?? ??? ?Calendar c=Calendar.getInstance();?? ??? ??? ??? ?System.out.println(c.get(YEAR));?? ??? ??? ??? ?System.out.println(c.get(MONTH));?? ??? ??? ??? ?System.out.println(c.get(DATE));?? ??? ??? ??? ?c.set(2003,10,23,12,32,23);?? ??? ??? ??? ?c.add(YEAR,-1);?? ??? ??? ??? ?c.roll(MONTH,-8);?? ?}}
1 回答
已采納

yanrun
TA貢獻(xiàn)317條經(jīng)驗(yàn) 獲得超240個(gè)贊
拼錯(cuò)了,應(yīng)該是Calendar c=Calendar.getInstance();
點(diǎn)擊展開后面3條
添加回答
舉報(bào)
0/150
提交
取消