Loading

Q1.

Which of the following is NOT an advantage of thread-based multitasking?

A. Efficient memory usage

B. Faster context switching

C. Less overhead compared to processes

D. Provides more security between tasks


Q2.

Which method in Java starts the execution of a thread for multitasking?

A. run()

B. start()

C. execute()

D. main()


Q3.

 Which of the following is true about process-based multitasking?

A. It is more lightweight than threads

B. It requires more memory and is slower than threads

C. It is used in Java to create threads

D. It allows direct communication between processes


Q4.

Which type of multitasking is implemented in Java by using threads?

A. Process-based multitasking

B. Thread-based multitasking

C. Both A and B

D. None of the above


Q5.

 What is multitasking in Java?

A. Executing multiple programs at the same time

B. Executing multiple threads or processes simultaneously

C. Writing multiple classes in one program

D. Running only one task at a time