【Java】System类时间戳

System类中获取时间戳

long time = System.currentTimeMillis();
//返回当前时间与1970年1月1日0时0分0秒之间以毫秒为单位的时间差称为时间戳
System.out.println(time);
posted @ 2021-08-10 16:38  ekertree  阅读(75)  评论(0)    收藏  举报