一、介绍 Instant类由一个静态的工厂方法now()可以返回当前时间戳 时间戳是包含日期和时间的,与java.util.Date很类似,事实上Instant就是类似JDK8以前的Date Instant和Date这两个类可以进行转换 二、实例 public static void main(String[] args) { Instant instant = Instant.now(); System.out