Discussion
Which one of the following statements about Callable compared with Runnable is true?
Answer: A
Runnable.run() returns void and declares no checked exception, so a task that produces a result or fails has nowhere to put either. Callable.call() returns a value and is declared to throw Exception, which is why an ExecutorService hands back a Future that can deliver a result or rethrow the failure.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development