LocalDate

This commit is contained in:
2024-11-13 21:27:09 +08:00
parent ff273fbcde
commit 78135ec799
2 changed files with 18 additions and 1 deletions

View File

@@ -1,4 +1,12 @@
package chapter5;
import java.time.Instant;
public class Example20 {
public static void main(String[] args) {
Instant now = Instant.now();
System.out.println(now);
Instant instant = Instant.ofEpochMilli(1000 * 60 * 60 * 24);
System.out.println(instant);
}
}