You go to any Java interview, senior or junior, experience or freshers, you are bound to see a couple of questions from the thread, concurrency, and multi-threading.In fact, this built-in concurrency support is one of the strongest points of Java programming language and helped it to gain popularity among enterprise world and programmers equally.These skills are thoroughly get tested by presenting various multi-threading and concurrency problems.Many Java developers are used to only look and read interview questions before going for the interview, which is not bad but you should not be too far away.2) What is the difference between Thread and Process in Java?(answer) The thread is a subset of Process, in other words, one process can contain multiple threads.
deadlock, race conditions, memory inconsistency and various thread safety related issues.For detailed answer and discussion see this article. (answer) This is a follow-up of previous multi-threading interview question.As we know we can implement thread either by extending interface, the question arise, which one is better and when to use one?Runnable is there from JDK 1.0 while Callable was added on JDK 1.5.
Main difference between these two is that Callable's method.
The multithreading and concurrency are also hard to master concept and only good developers with solid experience can effectively deal with concurrency issues.