Question 3
Back to Exercise
What does submit() return that execute() does not?
- A A Thread
- B A Future representing the task's result or exception Correct
- C An int status
- D Nothing – they are identical
Correct Answer: Option B
With submit, an exception is stored in the Future; with execute it goes to the thread's uncaught-exception handler.
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!