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 14 of 109Java CompletableFuture thenApply: Transforming Async Results
Learn how to use CompletableFuture.thenApply to transform async results, chain operations, and handle exceptions in 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.
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...
Java CompletableFuture: Building Async Pipelines
Learn how to use Java CompletableFuture to build asynchronous pipelines, combine tasks, handle errors, and manage concurrency effectively.
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.
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.
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.
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 Thread Pool: How Executors Behave Under Load
How Java thread pools behave under load: queue types, rejection policies, shutdown patterns, and production tuning for ThreadPoolExecutor.
Java Executors: Thread Pools and Task Lifecycles
How the Java Executor framework manages thread pools, task submission, shutdown, and error handling, plus guidance on choosing the right executor.