- 讲师:刘萍萍 / 谢楠
- 课时:160h
- 价格 4580 元
特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关
配套通关班送国网在线题库一套
百度广告
public class ShowDate {
public static void main(String args) {
Date trialTime = new Date();
// print out a bunch of interesting things
System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
System.out.println("DATE: " + calendar.get(Calendar.DATE));
System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
System.out.println("DAY_OF_WEEK_IN_MONTH: " + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
System.out.println("DST_OFFSET: " + (calendar.get(Calendar.DST_OFFSET)/(60*60*1000)));
System.out.println("Current Time, with hour reset to 3");
calendar.set(Calendar.HOUR, 3);
System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
System.out.println("DATE: " + calendar.get(Calendar.DATE));
System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
System.out.println("DAY_OF_WEEK_IN_MONTH: " + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
System.out.println("DST_OFFSET: " + (calendar.get(Calendar.DST_OFFSET)/(60*60*1000))); // in hours
}
责编:罗莉
上一篇:有状态网络的J2EE技术
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
点击加载更多评论>>