Java: Which statement about ExecutorService, Future, and CompletableFuture is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about ExecutorService, Future, and CompletableFuture is the strongest interview answer?

  1. ExecutorService, Future, and CompletableFuture is mostly a naming style choice and has little effect on runtime or design.
  2. ExecutorService, Future, and CompletableFuture exists mainly to reduce the number of Java files in a project.
  3. ExecutorService, Future, and CompletableFuture matters only for frontend frameworks, not for core Java applications.
  4. ExecutorService manages worker threads, Future represents pending results, and CompletableFuture composes asynchronous stages.

Hint

Start with the core rule behind ExecutorService, Future, and CompletableFuture.

Answer and rationale

Correct answer: D. ExecutorService manages worker threads, Future represents pending results, and CompletableFuture composes asynchronous stages.

ExecutorService manages worker threads, Future represents pending results, and CompletableFuture composes asynchronous stages. This is the base concept interviewers commonly test first.

Track: Java