Home Subjects Java Programming Multithreading

Java Programming
Multithreading

Java OOP, collections, multithreading

22 Q 10 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 21–22 of 22
Topics in Java Programming
Q.21 Easy Multithreading
Which method is used to stop a thread in Java?
A stop()
B interrupt()
C terminate()
D kill()
Correct Answer:  B. interrupt()
EXPLANATION

The interrupt() method is the proper way to stop a thread in Java. The stop() method is deprecated and dangerous.

Test
Q.22 Easy Multithreading
Which interface must be implemented to create a thread in Java?
A Runnable
B Threadable
C Executable
D Processable
Correct Answer:  A. Runnable
EXPLANATION

The Runnable interface is the correct interface to implement for creating threads in Java. It has a single abstract method run().

Test
IGET
IGET AI
Online · Exam prep assistant
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips