nerdexam
Oracle

1Z0-804 · Question #117

Given the code fragment: Which three are true?

The correct answer is A. On line 3, the current thread stops and waits until the t1 thread finishes. C. On line 4, the t1 thread is dead. F. This code may throw a checked exception. Thejoin()methods waits for this thread to die.

Concurrency

Question

Given the code fragment:

Which three are true?

Options

  • AOn line 3, the current thread stops and waits until the t1 thread finishes.
  • BOn line 3, the t1 thread stops and waits until the current thread finishes.
  • COn line 4, the t1 thread is dead.
  • DOn line 4, the t1 thread is waiting to run.
  • EThis code cannot throw a checked exception.
  • FThis code may throw a checked exception.

How the community answered

(30 responses)
  • A
    77% (23)
  • B
    3% (1)
  • D
    7% (2)
  • E
    13% (4)

Explanation

Thejoin()methods waits for this thread to die.

Topics

#thread join#thread lifecycle#checked exceptions#concurrency

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice