//结果为“0”是上午 结果为“1”是下午public class GregorianTest{public static void main(String args[]){GregorianCalendar ca = new GregorianCalendar();System.out.println(ca.get(GregorianCalendar.AM_PM));}}