Machine-translated by Google. Questions are authored in English.
Top

Discussion

What does Callable.call return?

  • A.A value of the Callable's type parameter
  • B.void
  • C.A Thread
  • D.A Future

Answer: A

Callable is generic and its call method returns the type argument, so a Callable of String returns a String. The Future is what an ExecutorService hands back when the task is submitted; call itself returns the result directly.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.