当前时间 java

来源:互联网 发布:windows平台开发swift 编辑:程序博客网 时间:2024/05/20 00:36
public static String getCurrentDateStr() {Date date = new Date();String CurrentTime = null;SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");CurrentTime = df.format(date);System.out.println(CurrentTime);return CurrentTime;}


原创粉丝点击