The ______ interface in Java represents the result of an asynchronous computation.

  • Callable
  • Executor
  • Future
  • Runnable
In Java, the Future interface represents the result of an asynchronous computation. It allows you to retrieve the result or handle exceptions once the computation is complete. A Callable is used to perform a task and return a result, and a Runnable is used to represent a task that can be executed asynchronously, but neither of them directly represents the result of the computation. The Executor interface is used to execute tasks, not represent results.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *