Java MCQs on Threads and Exceptions

Java MCQs on Threads and Exceptions

University

24 Qs

quiz-placeholder

Similar activities

Round 1

Round 1

University

20 Qs

CompSci unit 1 review

CompSci unit 1 review

7th Grade - University

19 Qs

Algo-Unlock

Algo-Unlock

University

20 Qs

Mastering C Programming Concepts

Mastering C Programming Concepts

University

20 Qs

Hukum HAM

Hukum HAM

University

20 Qs

Розробка клієнт-серверних застосувань

Розробка клієнт-серверних застосувань

University

25 Qs

Java Programming Quiz for swapna

Java Programming Quiz for swapna

University

20 Qs

Основы Python

Основы Python

University

19 Qs

Java MCQs on Threads and Exceptions

Java MCQs on Threads and Exceptions

Assessment

Quiz

Other

University

Medium

Created by

Niveditha N

Used 1+ times

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the correct way to start a thread?

run()

start()

execute()

launch()

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is the correct signature of the run method?

public void start()

public void run()

public int run()

void run()

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is multithreading?

Executing multiple programs

Executing multiple classes

Executing multiple threads concurrently

Executing functions sequentially

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which interface should a class implement to become a thread?

Runnable

Threadable

Thread

Run

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will happen if we directly call the run() method instead of start()?

Thread will start

Compile error

Runs as a normal method in main thread

New thread created

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which block is always executed whether an exception is handled or not?

catch

throw

try

finally

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What keyword is used to manually throw an exception?

throws

catch

throw

raise

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?