
Session 3

Quiz
•
Computers
•
University
•
Easy

Rafael Wampfler
Used 102+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which object is synchronized?
Nothing
this (the object the method belongs to)
We can't tell from just this
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When a thread leaves a synchronized block, other threads that want to enter it automatically try to do so.
True
False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which state is a thread after we call .start()?
NEW
RUNNABLE
NOT RUNNABLE
TERMINATED
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When does a thread leave the RUNNABLE state without entering the terminated state?
After .run() finished executing
When it becomes blocked or waiting
After creating it, before we call .start()
When we call .notRunnable()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a thread enters a NOT RUNNABLE state because it .waits() on an object, how does it go back to the RUNNABLE state?
It keeps checking if the object is no longer locked until it succeeds
If .notify() or .notifyAll() is called
After a certain amount of time it automatically happens
If we call .start() on it
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can a thread call synchronized() on the same object multiple times?
Yes
No, this causes an exception
No, this will make the program run forever
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can a thread become the owner of an object's monitor (lock)?
By executing a method/block synchronized on the object
By calling .wait() on the object
Threads can't own monitors
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To call .wait() or .notify() on an object, a thread has to own the monitor of that object.
True
False
Similar Resources on Wayground
7 questions
Webtech Tutorium 6 - Bootstrap + Promises

Quiz
•
University
10 questions
AppSquadz Internship Test

Quiz
•
University
10 questions
Structure of Java Program

Quiz
•
University
10 questions
Komposter

Quiz
•
University
5 questions
quizz - ADJP 04.01.2024

Quiz
•
University
11 questions
Distributed Systems

Quiz
•
University
8 questions
PCS - Semana 14

Quiz
•
University
12 questions
Java Class vocabulary

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University