Session 2

Session 2

University

5 Qs

quiz-placeholder

Similar activities

Reading and Reviewing - Research Seminar

Reading and Reviewing - Research Seminar

University

10 Qs

DE quiz based on unit 1 & 2

DE quiz based on unit 1 & 2

University

10 Qs

Software Engineering :TEST 2

Software Engineering :TEST 2

University

10 Qs

Web-II-Loop and Function

Web-II-Loop and Function

University

10 Qs

VITAP Quiz-1

VITAP Quiz-1

University

10 Qs

Abhyudaya coding class -  Grade 7

Abhyudaya coding class - Grade 7

6th Grade - University

10 Qs

WN-CELLULAR CONCEPT

WN-CELLULAR CONCEPT

University

10 Qs

UTB - FCNS 221PB

UTB - FCNS 221PB

University

10 Qs

Session 2

Session 2

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Rafael Wampfler

Used 96+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?