Skip to main content
1:1 mock interviews with Sumit, scored on a real hiring rubric.Book a slot →

5 topics · 0/5 read

Multithreading & Concurrency

Threads and their lifecycle, synchronized, volatile and the Java Memory Model, ExecutorService and thread pools, CompletableFuture, locks, atomics and deadlocks.

  1. Threads, Runnable vs Callable and the Thread Lifecycle

    Java multithreading questions start with how to create a thread, Runnable vs Callable, the thread states, and the difference between start and run. These basics lead into every harder concurrency question.

    Read now
  2. synchronized, volatile and the Java Memory Model

    synchronized gives mutual exclusion and visibility; volatile gives visibility and ordering without locking. Explaining the difference, and the happens-before rules behind them, is a core Java concurrency interview topic.

    Read now
  3. ExecutorService and Thread Pools

    Thread pools reuse threads for many tasks. Interviewers ask about the types of executors, how ThreadPoolExecutor decides between queueing and creating threads, rejection policies, and how to size a pool.

    Read now
  4. CompletableFuture and Async Programming

    CompletableFuture lets you compose async steps: run calls in parallel, chain transformations, combine results and handle errors without blocking. It is the standard way to call several services at once in a Java backend.

    Read now
  5. Locks, Atomic Classes and Deadlocks

    Beyond synchronized, java.util.concurrent offers ReentrantLock, read-write locks, atomic classes built on compare-and-swap, and synchronizers like CountDownLatch and Semaphore. Deadlock causes and prevention are classic

    Read now