java calendar获取系统当前小时数
calendar获取系统当前小时数
24小时制
Calendar calendar = Calendar.getInstance(); int curHour24 = calendar.get(calendar.HOUR_OF_DAY);
12小时制
Calendar calendar = Calendar.getInstance(); int curHour12 = calendar.get(calendar.HOUR);
本文来自博客园,作者:Marydon,转载请注明原文链接:https://www.cnblogs.com/Marydon20170307/p/11401244.html