System.currentTimeMillis()和new Date().getTime()比较

获取时间毫秒数时System.currentTimeMillis()方法比new Date().getTime()效率高, 因为new Date().getTime()方法调用的System.currentTimeMillis()

Date类的构造函数直接调用的System.currentTimeMillis()获取fastTime毫秒值:

getTime()方法在cdate为空(Date对象在进行无参构造创建对象时cdate默认为null)的情况下直接返回fastTime.

原文地址:https://www.cnblogs.com/mr-level/p/5611808.html