Vityarthi 5
Vityarthi 5
Correct Answer : 24
Wrong Answer : 1
Obtained marks : 24
Result : Passed
What is the key benefit of using Java threads over OS threads for developers?
2
Which concept refers to breaking down a program into multiple threads for
5
concurrent execution?
Multithreading Multiprocessing
Multitasking Synchronization
Answer : Multithreading
Which method allows one thread to wait until another thread has finished its
10
execution?
Sleep() Join()
Wait() Notify()
Answer : Join()
11 Which state does a thread enter after its run() method completes?
Waiting Terminated
Blocked Runnable
Answer : Terminated
12 What is the purpose of the isAlive() method in thread programming?
To Check If The Thread Is Blocked.
To Check If The Thread Is Terminated.
It Directly Creates New Threads For It Reuses Threads From A Thread Pool
Each Task. To Execute Tasks.
It Doesn't Handle Threads. It Can Only Manage A Single Thread.
Answer : It Reuses Threads From A Thread Pool To Execute Tasks.
Which method blocks until all tasks have completed execution or the timeout
14
occurs?
InvokeAll() AwaitTermination()
ShutdownNow() Submit()
Answer : AwaitTermination()
Runnable Callable
Future Thread
Answer : Future
23 Which of the following allows you to retrieve data from a database in JDBC?
CallableStatement PreparedStatement
ResultSet DriverManager
Answer : ResultSet
Course curriculum
100.00% Completed (137/137)