Skip to content

Glossary: Software Design Patterns in Java

Instant

Also written: Instant.now(), java.time.Instant

A Java class for a moment in time. `Instant.now()` is the real current time, and `Instant.parse` makes a fixed one for tests.

Where the book teaches it

Related terms

Clock (injected clock)