Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 27 of 109Java LocalDate minusDays: Subtract Days from a Date
Learn how to subtract days from a Java LocalDate using minusDays(), including boundary handling, negative arguments, and immutable behavior.
Using LocalDate.plusDays in Java
Learn how LocalDate.plusDays works, why it returns a new instance, and how to handle month boundaries, negative values, and overflow in Java.
Java DateTimeFormatter: Formatting and Parsing Dates
Learn how to use Java's DateTimeFormatter to format and parse dates and times, including pattern letters, builder usage, thread safety, locales, and common pitfalls.
Java LocalDate Format: Patterns and Examples
Learn how to format a Java LocalDate with DateTimeFormatter, including predefined and custom patterns, locale handling, parsing, and common pitfalls.
Java LocalDate parse: Converting Strings to Dates
Learn how to parse strings into LocalDate using DateTimeFormatter, handle invalid inputs, and avoid common pitfalls in Java.
Java LocalDate.now(): Get the Current Date
Learn how LocalDate.now() gets the current date in Java, including time zone handling, formatting, thread safety, and common pitfalls.
Java Date vs LocalDate: Choosing the Right Type
Learn the core difference between java.util.Date and java.time.LocalDate, when to use each, and how to convert between them safely.
Java Period: Date-Based Amounts in java.time
Use java.time.Period to represent date-based amounts in years, months, and days, including creation, arithmetic, normalization, and differences from Duration.
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...