java获取明天的日期
public static void main(String[] args){try {//获取当前日期Date date = new Date();SimpleDateFormat sf = new SimpleDateFormat("yyyyMMdd");String nowDate = sf.format(date);System.out.println(nowDate);//通过日历获取下一天日期Calendar cal = Calendar.getInstance();cal.setTime(sf.parse(nowDate));cal.add(Calendar.DAY_OF_YEAR, +1);String nextDate_1 = sf.format(cal.getTime());System.out.println(nextDate_1);//通过秒获取下一天日期long time = (date.getTime() / 1000) + 60 * 60 * 24;//秒date.setTime(time * 1000);//毫秒String nextDate_2 = sf.format(date).toString();System.out.println(nextDate_2);} catch (Exception e) {// TODO: handle exception}}