Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Mastering Java: The Ultimate Quiz for 'Thinking in Java'. Dive deep into Java with multiple-choice questions. Challenge yourself with quiz questions designed to test and improve your understanding of the 'Thinking in Java' book. Get ready for your exam!

Practice this question and more.


Which provides a high-level way of executing tasks asynchronously, possibly returning a result?

  1. Executor

  2. Runnable

  3. Callable

  4. Futures

The correct answer is: Callable

A Executor is a framework for initiating and managing a thread pool. It does not support returning a result. B: Runnable is an interface that allows a class to be executed as a thread, but it does not support returning a result. D: Futures is a class that allows for asynchronous execution, but it does not support the high-level abstraction of being able to return a result.