Which three are true?

Given the code fragment:

Which three are true?

Given the code fragment:

Which three are true?

A.
On line 3, the current thread stops and waits until the t1 thread finishes.

B.
On line 3, the t1 thread stops and waits until the current thread finishes.

C.
On line 4, the t1 thread is dead.

D.
On line 4, the t1 thread is waiting to run.

E.
This code cannot throw a checked exception.

F.
This code may throw a checked exception.

Explanation:

Thejoin()methods waits for this thread to die.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


zdeDu

zdeDu

Runable object cannot throws checked exception, but Callable can.

test

test

t1.join() throws InterruptedException.

Class InterruptedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.InterruptedException

Dean Kosmač

Dean Kosmač

A, C, F