import java.util.*;
import java.text.*;
class CalendarDemo
{
public static void main(String[] args)
{
Calendar c = Calendar.getInstance();
int index = c.get(Calendar.PM);
int x = c.get(Calendar.DAY_OF_MONTH);
sop(c.get(Calendar.SUNDAY));//2012 //十分好奇调用这些字段会是神马结果,结果怎么都是2012呀??还有许多字段
//都是这样,谁能告诉我为啥呀?
sop(c.get(Calendar.PM));//打印结果为啥是2012
}
public static void sop(Object obj)
{
System.out.println(obj);
}
}
|