Asked by Terry Jenkins on Sep 27, 2024
Verified
If your class implements Runnable then what method is invoked to start the thread?
A) run)
B) execute)
C) start)
D) main)
Implements Runnable
Refers to a class in Java that implements the Runnable interface, enabling it to be executed by a thread.
Start The Thread
Initiating the execution of a thread's run method in multithreading environments, particularly in programming languages like Java.
- Comprehend the application and utilization of the Runnable interface in thread management.
Verified Answer
SJ
Steven Jarosz1 day ago
Final Answer :
C
Explanation :
The start() method is invoked to start the thread when the class implements the Runnable interface. Within the start() method, the run() method of the class is executed on a separate thread. Using execute() or main() method does not provide proper thread management and may result in unexpected behavior.
Learning Objectives
- Comprehend the application and utilization of the Runnable interface in thread management.