Skip to main content

Java: Converting LocalDateTime to ZonedDateTime Correctly

Learn every way to convert LocalDateTime to ZonedDateTime in Java: atZone(), atOffset(), UTC conversion, DST gap and overlap handling, and reverse conversion back to LocalDateTime — with annotated code and a complete reference table.

Jersey REST API – Complete File Upload and Download Example

Build a complete file-upload REST endpoint with Jersey 3.x: single file, multiple files, HTML form testing, curl commands, file-size limits, and a download endpoint. Includes production-hardening tips for cloud storage and MIME validation.

Mastering Maven: How to Create Your Own Custom Archetypes

Build a custom Maven archetype from scratch: create the descriptor, add Velocity-templated source files, install locally, generate a new Spring Boot project from it, and deploy to a team-shared repository. Step-by-step with working code.

A Practical Guide to Formatting ZonedDateTime in Java

Master formatting ZonedDateTime in Java with DateTimeFormatter: ISO formatters, custom ofPattern() strings, timezone conversion, parsing, and a full pattern reference table — with annotated code and sample output.

Java Comparator & Comparable: The Complete Guide

A complete, from-first-principles guide to Java's Comparable and Comparator: natural vs. external ordering, the comparing/thenComparing/reversed chaining API, nullsFirst/nullsLast, TreeSet, records as sort keys (and the equals-consistency trap they create), and a real reproduction of the integer-subtraction-overflow comparator bug with a failing test, not just a warning. Every example runs against a companion repository.