public static String getCurrentTime() { //获取系统时间 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(System.currentTimeMillis()); String currentTime = dateFormat.format(date); return currentTime; }
根据系统时间获取当前时间
获取当前时间的Java方法

被折叠的 条评论
为什么被折叠?



