
thread
Quiz
•
Science, Computers
•
University
•
Practice Problem
•
Hard
Zuraihah Ngadengon
Used 39+ times
FREE Resource
Enhance your content in a minute
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is multithreaded programming?
It’s a process in which two different processes run simultaneously
It’s a process in which two or more parts of same process run simultaneously
Its a process in which many different process are able to access same information
Its a process in which a single process can access information from many sources
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of these statements is incorrect?
By multithreading CPU’s idle time is minimized, and we can take maximum use of it
By multitasking CPU’s idle time is minimized, and we can take maximum use of it
Two thread in Java can have same priority
A thread can exist only in two states, running and blocked
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of this class is used to make a thread?
String
System
Thread
Runnable
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of this interface is implemented by Thread class?
Runnable
Connections
Set
MapConnections
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of this method of Thread class is used to suspend a thread for a period of time?
sleep()
terminate()
suspend()
stop()
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of this method is used to begin the execution of a thread?
run()
start()
runThread()
startThread()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Complete the program code below that is suitable to start a thread.
class X implements Runnable
{
public static void main(String args[])
{
/* Missing code? */
}
public void run() {}
}
Thread t = new Thread(X);
X x1 = new X();
Thread t = new Thread(x1);
t.start();
Thread t = new Thread(X);
t.start();
Thread t = new Thread();
x.run();
8.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Select method that must be defined by a class implementing the java.lang.Runnable interface.
public void runs()
public void run()
public void start()
void run(int priority)
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following program code?
The program does not compile because the start() method is not defined in the Test class.
The program compiles, but it does not run because the start() method is not defined.
The program compiles, but it does not run because the run() method is not implemented
The program compiles and runs fine
Similar Resources on Wayground
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Science
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
