三种获取毫秒值的方式

从1970年1月1日0时0分0秒到现在的毫秒数

    public static void main(String[] args) {
        System.out.println(System.currentTimeMillis());
        System.out.println(new Date().getTime());
        System.out.println(Calendar.getInstance().getTimeInMillis());
    }

 

posted @ 2019-01-11 10:34  gallenlee978  阅读(933)  评论(0编辑  收藏  举报