Browse by Topic
Popular
Popular Posts
Latest
Latest Java Posts
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 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 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.
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.
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.
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.
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 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.
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.
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.