更新时间:2021-10-10 17:35:03
这是 Java 8 中引入的一个新的时间/日期 API.这就是它不能与 Java 7 一起编译的原因.
toInstant() 是默认方法,而 -source 1.7 不支持默认方法(Java 8 的新特性).
toInstant()
-source 1.7
toInstant() is a default method, whereas -source 1.7 doesn't support default methods (Java 8's new feature).
带有 -source 1.7 的 JDK8 [默认方法]