Skip to content

Java Developer interview questions

Core Java, collections, concurrency, JVM, Spring and testing for Java developer roles.

61 questions · 6 topics · 12 free answers

Java Developer roadmap4 stages from basics to interview-ready. Learn the gaps, then come back and practise.

0 of 61 practised · 0 bookmarked · saved on this device

8 questions match

Multithreading and Concurrency
  1. #1What is the difference between Runnable and Callable?EasyConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  2. #2What does volatile guarantee and what does it not?MediumConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  3. #3Why use an ExecutorService instead of creating threads directly?MediumConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  4. #4What is CompletableFuture used for?MediumConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  5. #5What are atomic classes and how do they work?MediumConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  6. #6What are virtual threads and when are they useful?HardConceptMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  7. #7Your thread pool queue grows without bound and the service runs out of memory under load. What do you change?HardScenarioMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  8. #8Two threads update a shared counter and the total is sometimes wrong. How do you find and fix it?HardScenarioMultithreading and Concurrency Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

Hunting for a Java Developer role too? See open Java Developer jobs.