Which of these correctly declares a thread pool that reuses idle threads and creates new ones as needed?
Answer: C
newCachedThreadPool takes no size argument, which is the point: the pool grows on demand and retires idle threads. A bounded pool is what newFixedThreadPool provides, and there is no public CachedThreadPool class or newElasticPool method.
Please log in or register to report this question.