Java Thread and I/O Quiz

Java Thread and I/O Quiz

University

25 Qs

quiz-placeholder

Similar activities

QUIZ IT LITERACY

QUIZ IT LITERACY

University

20 Qs

Pemrograman Berorientasi Objek

Pemrograman Berorientasi Objek

University

26 Qs

Java IO

Java IO

University

22 Qs

Java Programming

Java Programming

University

20 Qs

Multithreading in java

Multithreading in java

University

20 Qs

Susulan PBO XIRPL (2021/2022)

Susulan PBO XIRPL (2021/2022)

11th Grade - University

20 Qs

I file in VB

I file in VB

10th Grade - Professional Development

20 Qs

Week 5 - CompTIA ITF+ Binary and Notations

Week 5 - CompTIA ITF+ Binary and Notations

University

20 Qs

Java Thread and I/O Quiz

Java Thread and I/O Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Aswini G

Used 1+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to create a thread in Java?

Extending the Thread class

Implementing Runnable interface

Both a and b

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method must be overridden when implementing the Runnable interface?

start()

stop()

run()

init()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to start a thread execution?

run()

start()

execute()

initialize()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the synchronized keyword?

To speed up thread execution

To prevent thread execution

To control access to critical sections

To terminate threads

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following are ways to synchronize a block of code?

synchronized method

synchronized statement

synchronized object

Both a and b

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a critical section?

Part of the code where memory is freed

Part of code accessed by multiple threads

A section used only once

None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used for inter-thread communication?

notify()

wait()

notifyAll()

All of the above

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?