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 30 of 109Java Optional.of: Usage, Pitfalls, and When to Use It
Learn how Java's Optional.of creates present Optional values, why it rejects null, and when to choose Optional.ofNullable instead.
Java Optional Usage: Patterns and Pitfalls
java optional usage: Learn how to use Java Optional correctly: creating instances, reading values safely, transforming with map and flatMap, and avoiding common pitfalls.
Java Optional: Usage, Pitfalls, and When to Use It
java optional: Learn how Java Optional works, when to use it, and when to avoid it. Covers map, flatMap, orElse, orElseGet, and common mistakes in real code.
Java Boxed Stream: When and How to Use boxed()
Learn what boxed() does in Java streams, when you need it, and how it affects performance and memory usage in your code.
Java IntStream rangeClosed: Inclusive Range Generation
Learn how to use Java IntStream.rangeClosed to generate inclusive integer ranges, with syntax, examples, and edge cases to avoid common mistakes.
Java IntStream Range: Using range() and rangeClosed()
Learn how to generate numeric sequences with Java's IntStream.range and rangeClosed, with practical examples and performance considerations.
Java DoubleStream: Primitive Double Streams Explained
Learn how to use Java DoubleStream for efficient primitive double processing, including creation, operations, performance tradeoffs, and edge cases.
Java LongStream: A Practical Guide to Primitive Streams
Learn how to create and use Java LongStream for primitive long operations, including creation, common operations, performance considerations, and when to choose it over Stream<Long>.
Java IntStream: Working with Primitive Streams
Learn how to use Java IntStream for efficient primitive integer processing, covering creation, operations, performance, and common pitfalls.
Java Primitive Streams: Avoiding Boxing Overhead
java primitive streams: Understand Java primitive streams (IntStream, LongStream, DoubleStream) to avoid boxing overhead and write more efficient stream pipelines.