Discussion
Consider starting the same thread twice. Which statement is correct?
Answer: B
The javadoc is explicit that it is never legal to start a thread more than once, and that a thread may not be restarted once it has completed execution. The second call throws IllegalThreadStateException. Re-running work needs a fresh Thread object, or an executor that manages reuse for you.
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