Browse by Topic

Popular

Latest

Latest Java Posts

Illustration of a Java IntStream pipeline showing primitive integer values flowing through transformation stages into an aggregated result.
Java

Java IntStream: Working with Primitive Streams

Learn how to use Java IntStream for efficient primitive integer processing, covering creation, operations, performance, and common pitfalls.

IntStreamJava StreamsStream APIFunctional Programming
Illustration of Java primitive streams avoiding boxing overhead with IntStream, LongStream, and DoubleStream.
Java

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.

IntStreamLongStreamDoubleStreamboxing overhead
Diagram comparing sequential stream processing on a single thread with parallel stream processing split across multiple threads in a fork-join pool.
Java

Java Stream vs ParallelStream: Choosing the Right Pipeline

Understand when parallelStream actually improves performance and when it adds overhead. Covers splitting, ForkJoinPool behavior, and decision criteria.

Java StreamsParallel ProcessingForkJoinPoolPerformance
Diagram showing a Java stream splitting into parallel branches processed by multiple threads.
Java

Java Parallel Stream: When and How to Use It

java parallel stream: Learn how Java parallel streams work, when they improve performance, and avoid common concurrency pitfalls like thread safety and ordering.

parallel streamsjava streamsfork-join poolconcurrency
A single orderly line of data elements flowing through a processing funnel, representing a Java sequential stream.
Java

Java Sequential Stream: How the Default Stream Mode Works

Understand how Java sequential streams process elements, when to use them instead of parallel streams, and how the default Stream API mode works.

JavaStream APIFunctional ProgrammingCollections
Illustration of a Java stream being closed and throwing an error, with a fix showing a supplier creating a new stream.
Java

Java Stream Closed Error: How to Fix It

Learn why a Java stream throws 'stream has already been operated upon or closed' after a terminal operation, and how to avoid it with suppliers or by collecting results.

Java StreamsIllegalStateExceptionStream ReuseFunctional Programming
Illustration of a one-way stream pipeline that cannot be replayed, with a single-use arrow and a fresh stream being created from the same source.
Java

Java Stream Reuse: Why Streams Are Single-Use

java stream reuse: Java streams are single-use by design. Learn why reuse throws IllegalStateException, and how to replay pipelines with Supplier or materialize result...

Java StreamsStream APISupplierFunctional Programming
Diagram showing a Java stream pipeline with lazy intermediate operations and a terminal operation triggering execution.
Java

Java Stream Lazy Evaluation Explained

Understand how Java Streams defer computation until a terminal operation is called, and how lazy evaluation affects performance, short-circuiting, and side effects.

Java StreamsLazy EvaluationStream APIFunctional Programming
Diagram showing a Java stream pipeline with lazy intermediate operation stages flowing into an eager terminal operation that produces a final result.
Java

Java Intermediate vs Terminal Operations Explained

Understand how Java Streams distinguish lazy intermediate operations from eager terminal operations and how that affects pipeline execution.

Java StreamsStream APIFunctional ProgrammingLazy Evaluation
Diagram illustrating Java Stream terminal operations triggering data processing pipeline
Java

Java Stream Terminal Operations: How They Work

java stream terminal operations: Understand Java Stream terminal operations, how they trigger pipeline execution, and how to choose the right one for your data process...

Java StreamsTerminal OperationsStream APIFunctional Programming