1 Star 0 Fork 0

魏冬东/java数据操作方法及排序

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
OutCurrenTime.java 532 Bytes
一键复制 编辑 原始数据 按行查看 历史
魏冬东 提交于 2020-09-08 20:51 +08:00 . 不同格式输出当前日期
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 不同格式输出当前日期
*/
public class OutCurrenTime {
public static void main(String[] args) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
Date date = new Date(System.currentTimeMillis());
System.out.println(simpleDateFormat.format(date));
System.out.println(dateFormat.format(date));
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/wei_dongdong/java-functions.git
git@gitee.com:wei_dongdong/java-functions.git
wei_dongdong
java-functions
java数据操作方法及排序
master

搜索帮助