nerdexam
Oracle

1Z0-804 · Question #76

Given: Which two are true?

The correct answer is C. Greeting is printed once. E. No new threads of execution are started within the main method. Thread t2 is executed. Execution of T2 starts executionen of t1. Greeting is printed during theexecution of t1.

Concurrency

Question

Given:

Which two are true?

Options

  • AA runtime exception is thrown on line 9.
  • BNo output is produced.
  • CGreeting is printed once.
  • DGreeting is printed twice.
  • ENo new threads of execution are started within the main method.
  • FOne new thread of execution is started within the main method.
  • GTwo new threads of execution are started within the main method.

How the community answered

(47 responses)
  • A
    11% (5)
  • B
    6% (3)
  • C
    79% (37)
  • D
    2% (1)
  • G
    2% (1)

Explanation

Thread t2 is executed. Execution of T2 starts executionen of t1. Greeting is printed during theexecution of t1.

Topics

#Thread#Runnable#run vs start#thread execution

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice