Card 28 / 42: Thread objects are created by:
A)
direct instantiation from java.lang.Thread class
B)
instantiation from a class which implements the java.lang.Thread class
C)
instantiation a Runnable object (from a class which implements the Runnable interface)
D)
instantiation a Runnable object (from a class which implements the Runnable interface) and passing this Runnable object to a Thread constructor.
Answer:
A) direct instantiation from java.lang.Thread class
D) instantiation a Runnable object (from a class which implements the Runnable interface) and passing this Runnable object to a Thread constructor.
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
Instantiating from a class that implements Runnable is not enough to create a Thread object. You still to create a Thread object need to invoke a Thread constructor passing to it this Runnable object.
|
Oracle Certified Professional Java Programmer
Author:
JavaChamp TeamSenior Java Developer
QuizOver.com
Germany
Access: |