
Session 2
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Rafael Wampfler
Used 96+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you get a new thread to execute its run method?
This automatically happens when you create the thread.
Call .start() on the thread.
Call .run() on the thread.
Call .start() on the thread, then call .run().
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
When is the JVM terminated (i.e., when does a Java programm "end")?
When the main thread finishes executing.
When all non-daemon (user) threads finish executing.
Whenn ALL threads finish executing, including daemon (non-user) threads.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the problem with the following code?
There is no problem.
The nested class MyThread needs to be static.
The class is defined above the main method.
The nested class MyThread can't be public.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How are instructions of different threads interleaved?
The thread first created finishes executing, then the second thread, etc.
The threads execute one instruction each, taking turns in order of creation.
Randomly, but no thread executes two instructions in a row if others "wait".
Randomly, there are no guarantees.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Will this compile and run without a problem?
No, the threads are not joined.
Yes.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Information systems concepts
Quiz
•
University
8 questions
Overview of IT
Quiz
•
6th Grade - University
10 questions
Web-II-Loop and Function
Quiz
•
University
10 questions
Abhyudaya coding class - Grade 7
Quiz
•
6th Grade - University
10 questions
WN-CELLULAR CONCEPT
Quiz
•
University
10 questions
UTB - FCNS 221PB
Quiz
•
University
10 questions
Troubleshooting and Computer Maintenance Quiz
Quiz
•
University
10 questions
Algorithm analysis: divide & conquer theory
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University
