Java计算两个日期之间相差多少天

long daysBetween=(end.getTime()-start.getTime()+1000000)/(60*60*24*1000);