Multithreading

Multithreading

University

28 Qs

quiz-placeholder

Similar activities

Quiz Manajemen Memori dan Proses

Quiz Manajemen Memori dan Proses

University

28 Qs

Technical Quiz

Technical Quiz

University

24 Qs

OS Sessional Test 2024 Batch (CS,DS,AI)

OS Sessional Test 2024 Batch (CS,DS,AI)

University

25 Qs

generic programming in java

generic programming in java

University

24 Qs

ADVANCE JAVA PROGRAMMING

ADVANCE JAVA PROGRAMMING

University

27 Qs

Java Programming - Second Internal Examination

Java Programming - Second Internal Examination

University

30 Qs

OOPS REVISION

OOPS REVISION

University

28 Qs

¿Sabes más que un estudiante de avanzada? 2023-1

¿Sabes más que un estudiante de avanzada? 2023-1

University

25 Qs

Multithreading

Multithreading

Assessment

Quiz

Computers

University

Medium

Created by

Shivani Girme

Used 6+ times

FREE Resource

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a thread in Java?

A lightweight process

A class

A function

  • A variable

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the main advantage of multithreading?

Decreased performance

Increased CPU utilization

More memory consumption

None of the above

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In Java, a thread is represented by which class?

Runnable

ThreadClass

Thread

Executor

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How can we create a thread in Java?

By extending Thread class

By implementing Runnable interface

Both a & b

None of the above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct syntax to create a thread by extending the Thread class?

class MyThread extends Runnable { }

class MyThread extends Thread { }

class MyThread implements Thread { }

  • class MyThread implements Runnable { }

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is overridden when using the Runnable interface?

start()

execute()

begin()

run()

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method is used to start a thread?

run()

start()

execute()

  • begin()

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?