
Session 3
Authored by Rafael Wampfler
Computers
University
Used 102+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
Embedded Systems: Prototyping Tools and Techniques
Quiz
•
University
10 questions
tkinter quiz
Quiz
•
University
12 questions
Quiz PAW 03
Quiz
•
University
10 questions
02 - Python - Introduction & Installation
Quiz
•
University - Professi...
10 questions
External Devices
Quiz
•
University
10 questions
Online scams
Quiz
•
University
10 questions
Computer Networks quiz
Quiz
•
University
11 questions
Week 3
Quiz
•
University
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade