Java中获取当前时间并格式化 主要有以下方式,代码如下: 1.使用Calendar Calendar now = Calendar.getInstance(); System.out.println(“年:” + now.get( … 继续阅读 Java中获取当前时间并格式化