Date date1 = new Date();Date date2 = new Date();long between = date2.getTime() - date1.getTime();if(between > (24* 3600000)){ return true;}return false;
转成相同类型比较呗,或者都转成long型进行比较