Java 获取当前小时
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY); // 24小时制
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR); // 12小时制
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY); // 24小时制
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR); // 12小时制