当前位置: 技术问答>java相关
请问在java里面如何调用系统当前的时间?
来源: 互联网 发布时间:2015-06-08
本文导语: 谢谢! | int year ; int month ; int day ; Calendar todaysDate = new GregorianCalendar(); year = todaysDate.get(Calendar.YEAR); month = todaysDate.get(Calendar.MONTH) + 1; day = todaysDate.get(Calendar.DAY_OF...
谢谢!
|
int year ;
int month ;
int day ;
Calendar todaysDate = new GregorianCalendar();
year = todaysDate.get(Calendar.YEAR);
month = todaysDate.get(Calendar.MONTH) + 1;
day = todaysDate.get(Calendar.DAY_OF_MONTH);
int month ;
int day ;
Calendar todaysDate = new GregorianCalendar();
year = todaysDate.get(Calendar.YEAR);
month = todaysDate.get(Calendar.MONTH) + 1;
day = todaysDate.get(Calendar.DAY_OF_MONTH);