Multithreading is a technique that allows a program or a process to execute many tasks concurrently (at the same time and parallel). It allows a process to run its tasks in parallel mode even on a single processor system.
Java has a built in concurrency support. In Java, the Java Virtual Machine (JVM) allows an application to have multiple threads of execution running concurrently. It allows a program to be more responsible to the user. When a program contains multiple threads then the CPU can switch between the two threads to execute them at the same time. This built in Concurrency support is one of the strongest point of java and helped it to gain popularity.
If you go to any core java interviews, you are bound to face questions from multithreading. Most of the lucrative Java developer positions demand excellent knowledge of multithreading and experience in developing, debugging and tunning high performance low latency concurrent java applications. Below are set of articles to cover important topics and interview questions from the multithreading in JAVA.
- Defining And Starting A Thread | Thread VS Runnable
- Inter thread communication using wait(), notify() and notifyAll() methods
- interrupt(), interrupted() and isInterrupted()
- Thready Safety in Singleton Design Pattern using Double Checked Locking Approach
Java Concurrency Utilities
Multithreading and concurrency are hard to master concepts and only good developers with solid experience can effectively deal with concurrency issue. Also only basic multithreading knowledge is not enough. You need to learn about various utilities available in
java.util.concurrent package. Here is the list of articles on various concurrent package utilities. Prepare it well for excelling in your next core java interview. 🙂
- CountDownLatch Vs CyclicBarrier
- Producer Consumer Design Pattern using BlockingQueue
- Threadpool using Executor Framework
- Hashtable Vs SynchronizedMap Vs ConcurrentHashMap
We will keep adding more articles to this section. Stay tuned 🙂 If you want us to write for any specific topic or interview question, you can contact us via facebook or write a mail to use at firstname.lastname@example.org