Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MultiThreading Quiz

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

Execution of a java thread begins on which method call?

a)

Run ()

b)

Start ()

c)

Execute ()

d)

Launch ()

2.

How many ways a thread can be created in Java multithreading?

a)

1

b)

2

c)

5

d)

10

3.

Which method is used to make main thread to wait for all child threads

a)

Join ()

b)

Sleep ()

c)

Wait ()

d)

Stop ()

4.

Default value of a java thread is

a)

0

b)

1

c)

5

d)

10

5.

If a priority of a java thread is 3 then the default priority of its child thread will be

a)

0

b)

1

c)

5

d)

3

6.

Daemon thread runs in

a)

BackGround

b)

Foreground

c)

Both

d)

none

7.

Which method is used to wait for child threads to finish in Java?

a)

Wait ()

b)

Sleep ()

c)

Join ()

d)

isAlive()

8.

Which will contain the body of the thread in Java?

a)

Start()

b)

Run()

c)

Main()

d)

Execute()

9.

The life cycle of a thread in java is controlled by

a)

JRE

b)

JDK

c)

JVM

d)

None

10.

Which method is used to get current running thread object?

a)

runningThread()

b)

currentThread()

c)

runnableThread()

d)

None

11.

Synchronized static methods acquire lock on

a)

Class

b)

Object

c)

Interface

d)

None

12.

Thread priority in Java is?

a)

Integer

b)

Float

c)

Double

d)

Long

13.

The life cycle of thread in JAVA is controlled by

a)

JDK

b)

JVM

c)

JRE

d)

None

14.

In JAVA multi threading, a thread can be created by_______

a)

Extending class

b)

Implementing Runnable Interface

c)

both

d)

none

15.

Which statements is/are correct

a)

On calling Thread start ( ) method a new thread is created

b)

Thread start( ) method call run( ) method internally

c)

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

d)

both a & b