Which method registers a thread in a thread scheduler?
-
run();
-
construct();
-
start();
-
register();
C
Correct answer
Explanation
Option 3 is correct. The start() method causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
Option 1 is wrong. The run() method of a thread is like the main() method to an application. Starting the thread causes the object's run method to be called in that separately executing thread.
Option 2 is wrong. There is no construct() method in the Thread class.
Option 4 is wrong. There is no register() method in the Thread class.