Instant EPOCH
defines the constant for the 1970-01-01T00:00:00Z epoch instant.
EPOCH
has the following syntax.
public static final Instant EPOCH
The following example shows how to use EPOCH
.
import java.time.Instant; public class Main { public static void main(String[] args) { Instant instant = Instant.EPOCH; System.out.println(instant.getEpochSecond()); } }
The code above generates the following result.