PrepZone Logo
PrepZone
Back to Java

Java · Medium

Difference between newFixedThreadPool(), newCachedThreadPool(), and newSingleThreadExecutor().

JavaConcurrency

Answer preview

newFixedThreadPool(n) — Creates a pool with a fixed number of threads. Uses an unbounded LinkedBlockingQueue. Good for workloads with a known degree of parallelism.…