Threads - Study Mode
[#1] What is a thread in Java?
Correct Answer
(A) A lightweight process that runs independently within a program
[#2] Which interface is used to create a thread in Java?
Correct Answer
(D) Runnable
[#3] What is the main advantage of using multithreading in Java programs?
Correct Answer
(C) Improved program performance by utilizing multiple CPUs or CPU cores
[#4] How can you create a new thread in Java by implementing the Runnable interface?
Correct Answer
(B) Create a class that implements the Runnable interface and override the run() method
[#5] What is the purpose of the start() method in Java threads?
Correct Answer
(C) It starts the execution of a new thread