Threading Model   «Prev  Next»


Multithreading and Thread Creation - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 

1. Which of the following are true about multithreading?
Please select all the correct answers.
  A. Multithreading is supported by Java.
  B. Multithreading can be supported by systems with one or more CPUs.
  C. Multithreading is only supported on systems with multiple CPUs.
  D. Multithreading is only supported on systems with a single CPU.

2. In which ways may a thread be defined?
Please select all the correct answers.
  A. By extending the Thread class.
  B. By implementing the Serializable interface.
  C. By implementing the Runnable interface.
  D. By extending the System class.


3. Which method is implemented by all threads?
Please select the best answer.
  A. init ()
  B. entry()
  C. execute()
  D. run()

4. Which Thread method is invoked to cause a thread to execute as a separate execution sequence?
Please select the best answer.
  A. init()
  B. run()
  C. start()
  D. go()

5. If a thread is defined by implementing the Runnable interface (and not extending the Thread class), what must be done to start the thread as a new execution sequence?
Please select the best answer.
  A. Invoke the thread's run() method.
  B. Create a Thread object using the thread and invoke the Thread object's start() method.
  C. Invoke the thread's execute() method.
  D. Create an instance of the thread using the newThread() method.