Java2024/src/chapter5/Example20.java
2024-11-13 21:27:09 +08:00

13 lines
300 B
Java

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);
}
}