Online Quiz on Unit-2

Online Quiz on Unit-2

University

10 Qs

quiz-placeholder

Similar activities

Peer-Learning

Peer-Learning

University

10 Qs

JAVA11

JAVA11

University

15 Qs

PGdP Nebenläufigkeit

PGdP Nebenläufigkeit

University

11 Qs

OS-Multithreading

OS-Multithreading

University

8 Qs

Tutorium1

Tutorium1

University

10 Qs

Quiz on Multithreading

Quiz on Multithreading

University

6 Qs

Thread Priorities

Thread Priorities

University

10 Qs

Computer Architecture

Computer Architecture

University

10 Qs

Online Quiz on Unit-2

Online Quiz on Unit-2

Assessment

Quiz

Computers

University

Medium

Created by

Rahul Badgujar

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct life cycle of a thread in Java?

New → Running → Blocked → Dead

New → Ready → Running → Blocked → Dead

New → Ready → Running → Waiting → Dead

New → Running → Waiting → Blocked → Dead

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following methods is used to create a thread in Java?

Thread()

run()

start()

execute()

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to pause the execution of the current thread for a specified amount of time in Java?

wait()

sleep()

join()

yield()

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will happen if the thread is in the 'blocked' state in Java?

It is currently executing.

It is waiting to acquire a lock or resource.

It is paused temporarily.

It has been terminated.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which interface must be implemented to create a thread in Java using the 'Runnable' approach?

Thread

Runnable

Process

Callable

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the default priority of a thread in Java?

1

5

10

100

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following methods is used to set the priority of a thread in Java?

setPriority()

setThreadPriority()

setPriorityLevel()

priority()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?