Browse by Topic

Popular

Latest

Latest Java Posts

Illustration of two chained CompletableFuture boxes flattening into one result box
Java

CompletableFuture thenCompose for Async Chaining

Use CompletableFuture.thenCompose to flatten nested async calls, chain dependent tasks, and handle exceptions in Java async pipelines.

CompletableFutureJava ConcurrencyAsync ProgrammingthenCompose
A diagram showing a CompletableFuture completing and passing its value into a thenAccept consumer that produces no result.
Java

Java CompletableFuture thenAccept: Syntax and Behavior

java completablefuture thenaccept: Learn how CompletableFuture.thenAccept works, how it differs from thenApply and thenRun, and when to use it for side effects.

CompletableFutureJava ConcurrencyAsync ProgrammingConsumer
Illustration of CompletableFuture thenApply transforming an async result into a new value.
Java

Java CompletableFuture thenApply: Transforming Async Results

Learn how to use CompletableFuture.thenApply to transform async results, chain operations, and handle exceptions in Java.

CompletableFutureJava ConcurrencyAsync ProgrammingthenApply
Illustration of a Runnable task being submitted to a thread pool and completing as a CompletableFuture with no return value.
Java

Java CompletableFuture runAsync: Usage and Examples

CompletableFuture.runAsync() schedules a Runnable for asynchronous execution and returns a CompletableFuture<Void>. See examples for custom executors, chaining, and failure handling.

CompletableFutureJava ConcurrencyAsync ProgrammingThread Pools
Diagram of a CompletableFuture supplyAsync task running on a separate thread and returning a result to the caller.
Java

Java CompletableFuture supplyAsync: Usage and Behavior

java completablefuture supplyasync: Learn how CompletableFuture.supplyAsync runs a Supplier asynchronously, returns a CompletableFuture<T>, and how to control executor...

JavaCompletableFutureAsynchronous ProgrammingConcurrency
Diagram of a Java CompletableFuture pipeline showing chained asynchronous tasks and error handling
Java

Java CompletableFuture: Building Async Pipelines

Learn how to use Java CompletableFuture to build asynchronous pipelines, combine tasks, handle errors, and manage concurrency effectively.

CompletableFutureAsynchronous ProgrammingJava ConcurrencyFuture
Diagram showing a Future.get() call blocking a thread until the task completes, with timeout and cancellation options.
Java

Java Future.get(): Blocking, Timeouts, and Cancellation

Future.get() blocks the calling thread until an asynchronous task finishes. Learn how it handles timeouts, checked exceptions, cancellation, and interruption in Java.

FutureConcurrencyExecutorServiceTimeout
Diagram comparing Java Runnable and Callable interfaces showing return value and exception handling differences
Java

Java Callable vs Runnable: Choosing the Right Task Interface

Compare Java's Runnable and Callable interfaces for concurrent tasks, including return values, checked exception handling, and ExecutorService usage.

CallableRunnableConcurrencyExecutorService
A Java developer working with Future objects to manage asynchronous tasks
Java

Java Future: Managing Asynchronous Results

Learn how to use Java's Future interface with ExecutorService to manage asynchronous results, handle timeouts and cancellation, and choose when CompletableFuture is a better fit.

JavaFutureConcurrencyAsynchronous programming
Diagram showing a Java Callable task submitted to an executor returning a Future result
Java

Java Callable: Return Results from Concurrent Tasks

java callable: Learn how to use Java Callable to return results from concurrent tasks, handle exceptions, and coordinate work with ExecutorService and Future.

java concurrencyexecutor servicefuturecallable interface