Java Multithreading Question and Answers

9. What is transient variable?
  A transient variable is a variable that may not be serialized during serialization and which is initialized by its default value during de serialization.
 
Your Name Your Email-ID
Your Answer
10. What is synchronization?
 
  • The Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.
  • With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources.
  • Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value.
  • This often causes dirty data and leads to significant errors.
 
Your Name Your Email-ID
Your Answer
11. What is deadlock?
  When two threads are waiting each other and can't precede the program is said to be deadlock.
 
Your Name Your Email-ID
Your Answer
12. How can a dead thread be restarted?
  A dead thread cannot be restarted.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 3 of 10