SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Handling Date, Time, Text, Numeric and Boolean Values

Java Date-Time API: Dates, Durations, Periods and Time Zones (OCP Java SE 25)

16 min read1Z0-831 · Handling Date, Time, Text, Numeric and Boolean ValuesUpdated

The Java Date-Time API (<code>java.time</code>) is the standard library of immutable classes for dates, times, instants, time zones and amounts of time: <code>LocalDate</code>, <code>LocalTime</code>, <code>LocalDateTime</code>, <code>Instant</code>, <code>ZonedDateTime</code>, <code>OffsetDateTime</code>, <code>Duration</code> and <code>Period</code>. Objective 1.3 of the Java SE 25 Developer exam asks you to manipulate all of them, including across daylight saving time. This lesson covers how values are created and validated, why every operation returns a new object, how months clamp and times wrap, the difference between <code>Duration</code> and <code>Period</code>, how <code>between()</code> truncates, which units each type supports, and how zones, offsets, DST gaps and overlaps change the result of date-based and time-based arithmetic.

You’ve read your 2 free 1Z0-831 lessons

Sign up free to read 48 more lessons — your progress is saved.

Source

This lesson covers the "Handling Date, Time, Text, Numeric and Boolean Values" domain of the official 1Z0-831 exam guide. Vendors revise their guides — check the source for the current version.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?