Browse by Topic

Popular

Latest

Latest Java Posts

A clock and a stopwatch representing java.time.Duration for measuring time intervals in Java applications.
Java

Java Duration: Measuring Time Intervals

Use java.time.Duration to represent and manipulate time-based amounts in Java, including parsing, conversion, arithmetic, and common pitfalls.

java.timeDurationtime measurementJava 8
A clock face merging with a digital timeline, symbolizing java.time.Instant's precise UTC timestamp representation
Java

Java Instant: Creating, Converting, and Comparing Timestamps

java instant: Explore java.time.Instant in Java with practical examples covering creation, conversion, parsing, comparison, and common pitfalls. Learn to work with tim...

java.timeInstantdate-time APItimestamps
Illustration of java ZonedDateTime handling multiple time zones with a clock and world map.
Java

Java ZonedDateTime: Handling Time Zones Without Losing Local Time

Learn how to use java.time.ZonedDateTime to represent date-time with a time zone, convert between zones, format it, and avoid DST pitfalls.

java.timeZonedDateTimetimezonedate-time API
Illustration of a calendar and clock merging into a single date-time object, representing java.time.LocalDateTime.
Java

Working with java.time.LocalDateTime in Java

java localdatetime: Learn how to create, manipulate, compare, and convert java.time.LocalDateTime instances, including common pitfalls and timezone considerations.

java.timedate-time APILocalDateTimeJava 8
A clock face with a highlighted time value and Java code snippets representing java.time.LocalTime operations.
Java

Working with java.time.LocalTime

java localtime: Learn how to use java.time.LocalTime to represent, manipulate, compare, and format times of day without time zones or dates.

Java 8java.timeLocalTimedate-time API
Editorial illustration of a calendar page with a single highlighted date, representing java.time.LocalDate as an immutable date-only value.
Java

How to Use java.time.LocalDate for Date Operations

Learn how to use java.time.LocalDate for Java date operations: creating, parsing, formatting, comparing, and adjusting immutable calendar dates without time or time zone.

LocalDatejava.timedate manipulationDateTimeFormatter
Illustration of Java date time API classes like LocalDate and ZonedDateTime with a clock and calendar.
Java

Java Date Time API: A Practical Guide

java date time api: Learn how to use the java.time API for dates, times, time zones, formatting, and arithmetic in real Java projects.

java.timeLocalDateZonedDateTimeDateTimeFormatter
A clean illustration of a Java Optional container with a value inside, representing safe null handling.
Java

Java Optional Best Practices for Cleaner Code

Learn when to use Java Optional, how to avoid the isPresent()/get() pitfall, and why orElse, orElseGet, orElseThrow, and streams lead to cleaner code.

OptionalJavaNull SafetyFunctional Programming
Editorial illustration comparing a wrapped Java Optional container with an empty null reference, showing the difference between handled and unhandled absence.
Java

Java Optional vs Null: When to Use Each

Compare java optional vs null for return values, fields, and parameters, covering allocation costs, serialization limits, and when each fits.

JavaOptionalNull HandlingAPI Design
Illustration of Java Optional filter concept showing a funnel filtering optional values with a coffee cup icon.
Java

Java Optional.filter(): Filtering Optional Values

Learn how to use Optional.filter() in Java to conditionally keep or discard optional values, avoid explicit null checks, and write cleaner functional code.

JavaOptionalStream APIFunctional Programming