Programming - Threads
You Are Here :: Home > JAVA > Threads - General Questions
7.
When any standalone application is running, it firstly execute the main() method runs in a one thread, called the ____________ thread.
A.
Child
B.
Parent
C.
Main
D.
Class
Answer: Option C
Explanation:
When any standalone application is running, it firstly execute the main() method runs in a one thread, called the main thread.
8.
The main thread creates some other threads called ______________________ threads.
A.
Child
B.
Parent
C.
Main
D.
Class
Answer: Option A
Explanation:
The main thread creates some other threads called child threads.
9.
After the creations of Thread instance the thread is in this state but before the start() method invocation. At this point, the thread is considered not alive.
A.
New State
B.
Running State
C.
Dead State
D.
Blocked State
Answer: Option A
Explanation:
New state ? After the creations of Thread instance the thread is in this state but before the start() method invocation. At this point, the thread is considered not alive.
10.
A thread is in running state that means the thread is currently executing is called _________________________________.
A.
New State
B.
Running State
C.
Dead State
D.
Blocked State
Answer: Option B
Explanation:
Running state ? A thread is in running state that means the thread is currently executing.
11.
A thread can be considered dead when its run() method completes is called _________________________________.
A.
New State
B.
Running State
C.
Dead State
D.
Blocked State
Answer: Option C
Explanation:
Dead state ? A thread can be considered dead when its run() method completes.
12.
A thread can enter in this state because of waiting the resources that are hold by another thread is called _________________________________.
A.
New State
B.
Running State
C.
Dead State
D.
Blocked State
Answer: Option D
Explanation:
Blocked - A thread can enter in this state because of waiting the resources that are hold by another thread.
« prev
next »