LearnFrenzy
Sign in Take a free test

Concurrency and Executors · Concurrency and Executors MCQ · Question 12

join() versus get() on CompletableFuture Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

How does CompletableFuture.join() differ from get()?

  • A join does not wait
  • B join throws the unchecked CompletionException instead of the checked ExecutionException/InterruptedException Correct
  • C join returns null on failure
  • D They are identical
Correct Answer: Option B

That makes join convenient inside lambdas and streams.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links