A Java developer must know multi-threaded programming in java. A good hands on experience is required to understand the core threads concepts. Multi-threading and thread optimization is a common topic in graphic designer interview questions and answers pdf performance tuning books as well.
This post is a collection of some good questions on Java threads, which can be asked to a senior java developer. What is synchronization in respect to multi-threading in Java?
With respect to multi-threading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one Java thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to erroneous behavior or program.
Explain different way of using thread? A Java thread could be implemented by using Runnable interface or by extending the Thread class. The Runnable is more advantageous when you are going for multiple inheritance.