Multiple Choice
Suppose that the class XYZ implements the interface Runnable. Which code creates a thread object and makes it available to the scheduler to be executed?
A) Thread t = new Thread(new XYZ() ) ;
t.start() ;
B) XYZ t = new Thread(new XYZ() ) ;
t.start() ;
C) new XYZ() .start() ;
D) Thread t = new XYZ(new Thread() ) ;
t.start() ;
Correct Answer:

Verified
Correct Answer:
Verified
Q23: a(n. _ uses a small number of
Q42: When a sleeping thread is interrupted, an
Q43: The Runnable interface includes which method(s)?<br>I public
Q44: Examine the SharedData class shown below. Suppose
Q45: Stale data occurs in multi-CPU machines when
Q47: For threads of equal priority, which is
Q50: Which argument(s) present(s) the best case(s) for
Q51: Assume three threads share a BankAccount object
Q52: Which method(s) are part of the Thread
Q80: When is it a good idea to