Search Header Logo

Thread 2

Authored by Jeevitha P

Computers

University

Used 17+ times

Thread 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What method in thread class do you call to make the current thread cease executing for a specified amount of time?

sleep()

pause()

stop()

wait()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How many threads does a process contains?

1

2

multiple

none

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these is not a thread state?

new

runnable

sleep

terminated

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which statements is/are correct

On calling Thread start () method a new thread get created.

Thread start () method call run () method internally

Thread run () method can also be called directly to create thread.

All correct

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which thread will be executed first if two threads have same priority

They will fall in starvation and none will be executed.

Both will be executed simultaneously

It depends upon operating system

They will be executed on first come first serve basis

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is used to create a daemon thread?

setDaemon(boolean value)

setThread(boolean value)

createDaemon(boolean value)

makeDeamon(boolean value)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is difference between starting thread with run() and start() method?

There is no difference

when you call start() method, main thread internally calls run() to start the newly created thread.

run() calls start() method internally

None of the above

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?

Discover more resources for Computers