Q) Thread synchronization in a process will be required when
- All threads sharing the same address space
- All threads sharing the same global variables
- All threads sharing the same files
- All
Answer: 4
Q) 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
Answer: 3
Q) The life cycle of a thread in java is controlled by
- JRE
- JDK
- JVM
- None
Answer: 3
Q) Which method is used to get current running thread object?
- runningThread()
- currentThread()
- runnableThread()
- None
Answer: 2