java 昨天今天明天
生活随笔
收集整理的這篇文章主要介紹了
java 昨天今天明天
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
Date?date=new?Date();//取時間Calendar?calendar?=?new?GregorianCalendar();calendar.setTime(date);calendar.add(calendar.DATE,1);//把日期往后增加一天.整數往后推,負數往前移動date=calendar.getTime();?//這個時間就是日期往后推一天的結果?SimpleDateFormat?formatter?=?new?SimpleDateFormat("yyyy-MM-dd");String?dateString?=?formatter.format(date);System.out.println(dateString);轉載于:https://my.oschina.net/anyyang/blog/507483
總結
以上是生活随笔為你收集整理的java 昨天今天明天的全部內容,希望文章能夠幫你解決所遇到的問題。