Java EE 7 Application Developer — Question 19

How can you configure, in a portable way, the number of threads used by a ManagedExecutorService?

Answer options

Correct answer: A

Explanation

The correct answer is A because you can configure the thread count programmatically with a ManagedExecutorService, allowing for portability across different environments. Options B and D suggest using utility classes or deployment descriptors, which are not portable solutions. Option C incorrectly states that configuration isn't possible, which is false as it can be done programmatically.