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
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
Q) The life cycle of a thread in java is controlled by
Q) Which method is used to get current running thread object?
MCQ- Java thread