[Java] 纯文本查看 复制代码
public class Test15 {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR,2008,Calendar.MONTH,7, Calendar.DAY_OF_MONTH,8);
System.out.println("2008获取到的为:" + c.get(Calendar.DAY_OF_YEAR));
c.set(Calendar.YEAR,2009);
System.out.println("2009获取到的为:" + c.get(Calendar.DAY_OF_YEAR));
}
}