Font size
WorksheetsThread 2
Total questions: 7
Worksheet time: 6mins
What method in thread class do you call to make the current thread cease executing for a specified amount of time?
sleep()
pause()
stop()
wait()
How many threads does a process contains?
1
2
multiple
none
Which of these is not a thread state?
new
runnable
sleep
terminated
Which statements is/are correct
On calling Thread start () method a new thread get created.
Thread start () method call run () method internally
Thread run () method can also be called directly to create thread.
All correct
Which thread will be executed first if two threads have same priority
They will fall in starvation and none will be executed.
Both will be executed simultaneously
It depends upon operating system
They will be executed on first come first serve basis
Which method is used to create a daemon thread?
setDaemon(boolean value)
setThread(boolean value)
createDaemon(boolean value)
makeDeamon(boolean value)
What is difference between starting thread with run() and start() method?
There is no difference
when you call start() method, main thread internally calls run() to start the newly created thread.
run() calls start() method internally
None of the above
