Programming - Threads
You Are Here :: Home > JAVA > Threads - General Questions
19.
The thread can come on this state because of waiting to acquire the lock of an object _________________.
A.
Waiting for notification
B.
Blocked on I/O
C.
Blocked for joint completion
D.
Blocked for lock acquisition
Answer: Option D
Explanation:
Blocked for lock acquisition ? The thread can come on this state because of waiting to acquire the lock of an object.
20.
In how many ways Thread can be implemented?
Answer: Option B
Explanation:
1)Extending the java.lang.2)Thread Class Implementing the java.lang.Runnable Interface
21.
If you extend the Thread Class, that means that subclass cannot extend any other Class, but if you implement _________________ interface then you can do this.
A.
Running
B.
Runnable
C.
Executable
D.
Compilable
Answer: Option B
Explanation:
If you extend the Thread Class, that means that subclass cannot extend any other Class, but if you implement Runnable interface then you can do this.
22.
The class implementing the _______________ interface can avoid the full overhead of Thread class which can be excessive.
A.
Running
B.
Runnable
C.
Executable
D.
Compilable
Answer: Option B
Explanation:
The class implementing the Runnable interface can avoid the full overhead of Thread class which can be excessive.
23.
____________________________ is used to represent a group of threads.
A.
ThreadGroup
B.
Threading
C.
Synchronization
D.
Assertions
Answer: Option A
Explanation:
ThreadGroup is used to represent a group of threads.
24.
____________________________ can be shown in a hierarchical manner.
A.
ThreadGroup
B.
Threading
C.
Synchronization
D.
Assertions
Answer: Option A
Explanation:
ThreadGroups can be shown in a hierarchical manner.
« prev
next »