
Session 2
Quiz
•
Computers
•
University
•
Medium
Rafael Wampfler
Used 96+ times
FREE Resource
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.
Similar Resources on Wayground
10 questions
ML in Apple platforms
Quiz
•
University - Professi...
9 questions
CHAPTER 5 ONLINE QUIZ
Quiz
•
University
10 questions
Recap - Macs & PCs
Quiz
•
University
10 questions
GODOT ENGINE
Quiz
•
University
10 questions
ดิจิทัลคอมเมิร์ซ (Digital Commerce)
Quiz
•
University
10 questions
ECM3434 Business Analysis 1 - Business process modelling
Quiz
•
University
10 questions
Introduction to Concepts of AI
Quiz
•
University
10 questions
Data Science Methodology
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
39 questions
Unit 7 Key Terms
Quiz
•
11th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
18 questions
Plotting Points on the Coordinate Plane
Quiz
•
KG - University
5 questions
Declaration of Independence
Interactive video
•
4th Grade - University
