Threads - General Questions Online Exam Quiz
Threads - General Questions GK Quiz. Question and Answers related to Threads - General Questions. MCQ (Multiple Choice Questions with answers about Threads - General Questions
What is the name of the method used to start a thread execution?
Options
A : init();
B : start();
C : run();
D : resume();
Which two are valid constructors for Thread?
Options
A : 1 and 3
B : 2 and 4
C : 1 and 2
D : 2 and 5
Which three are methods of the Object class?
Options
A : 1, 2, 4
B : 2, 4, 5
C : 1, 2, 6
D : 2, 3, 4
Which cannot directly cause a thread to stop executing?
Options
A : Calling the SetPriority() method on a Thread object.
B : Calling the wait() method on an object.
C : Calling notify() method on an object.
D : Calling read() method on an InputStream object.
Which two of the following methods are defined in class Thread?
Options
A : 1 and 4
B : 2 and 3
C : 3 and 4
D : 2 and 4
Which three guarantee that a thread will leave the running state?
Options
A : 1, 2 and 4
B : 2, 5 and 6
C : 3, 4 and 7
D : 4, 5 and 7
Which of the following will directly stop the execution of a Thread?
Options
A : wait()
B : notify()
C : notifyall()
D : exits synchronized code
Which method must be defined by a class implementing the java.lang.Runnable interface?
Options
A : void run()
B : public void run()
C : public void start()
D : void run(int priority)
Which will contain the body of the thread?
Options
A : run();
B : start();
C : stop();
D : main();
Which method registers a thread in a thread scheduler?
Options
A : run();
B : construct();
C : start();
D : register();
Declarations and Access Control - General Questions more Online Exam Quiz
Language Fundamentals - General Questions
Objects and Collections - General Questions
Automobile Engineering - Part 1
Compressors, Gas Dynamics and Gas Turbines - Part 1
Engineering Materials - Part 1