Calendar ca=Calendar.getInstance();
int c=ca.get(ca.YEAR);//默认情况的Year是当前日期
System.out.println("Year "+c);
ca.set(Calendar.YEAR,2008);
int years=ca.get(ca.YEAR);
System.out.println("Change Year After :"+years);
int day=ca.get(ca.DATE);
System.out.println("NOW day"+day);//表示的是几号
ca.add(ca.DATE, 10);
int daynew=ca.get(Calendar.DATE);
System.out.println("Change Day "+daynew);
int c=ca.get(ca.YEAR);//默认情况的Year是当前日期
System.out.println("Year "+c);
ca.set(Calendar.YEAR,2008);
int years=ca.get(ca.YEAR);
System.out.println("Change Year After :"+years);
int day=ca.get(ca.DATE);
System.out.println("NOW day"+day);//表示的是几号
ca.add(ca.DATE, 10);
int daynew=ca.get(Calendar.DATE);
System.out.println("Change Day "+daynew);