java中比较两个日期大小

1.birthday.getTime()<graduation.getTime()

2.java.util.Calendar c1 = java.util.Calendar.getInstance();
   c1.setTime(birthday);
   Calendar c2 = Calendar.getInstance();
   c2.setTime(graduation);
   c1.before(c2)

你可能感兴趣的:(java,Date,职场,休闲)