Instant, Duration & Period in Java
🟢 Beginner Level | Java Core Syntax
📖 Definition
Instant represents machine timestamps, Duration measures time in seconds/nanos, and Period measures date units (years/months/days).
âš¡ Code Example
Period p = Period.between(LocalDate.now(), LocalDate.of(2027, 1, 1));
🧠Navigation
← 01. LocalDate, LocalTime & LocalDateTime | Module Hub | 03. DateTimeFormatter & Timezones →