码迷,mamicode.com
首页 > 其他好文 > 详细

获取当前年份,获取当前系统时间

时间:2019-03-02 18:48:04      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:mat   orm   date   pre   calendar   时间   cal   tin   end   

//获取当前年份
Integer year = Calendar.getInstance().get(Calendar.YEAR);

//获取当前系统时间
Integer time = Integer.valueOf(sd.format(new Date()));

 

获取当前年份,获取当前系统时间

标签:mat   orm   date   pre   calendar   时间   cal   tin   end   

原文地址:https://www.cnblogs.com/maogege/p/10462236.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!