Font size
WorksheetsJava Lab10
Total questions: 10
Worksheet time: 5mins
When main() method in a Java program creates 3 threads, how many threads are in execution?
0
2
4
3
The order of execution if threads is managed by:
Java Compiler
Default Scheduler
Thread Manager
Thread Scheduler
A Thread can be created by
Extending "Thread" Class
Extending "Runnable" Class
Implementing "Runnable" Interface
Extending "Object" Class
The start() method of an thread object will change the thread from _______ state to _______ state.
Ready to Active
Born to Ready
Ready to Wait
Active to Ready
The constant value assigned to MAX_PRIORITY is
1
10
5
20
The default priority for all child threads is:
5
10
Inherited by Parent thread
No priority
The different ways to handle exceptions is by using:
try & catch block and ExceptionHandler()
throws and finally()
try & catch and throws
finally() and finalize()
_________ is usually used to handle user defined exceptions
ExceptionHandler()
UserException()
throw
finalize()
Adapter class forces the child class to implement all the methods from the interface.
True
False
What is the output?
Thread starts
Thread starts, Thread is active
Thread is active
Compile error
