StackTipsStackTips
Javaadvanced

Java Advanced - Concurrency, Streams, and Modern Features Quiz

Advanced Java quiz covering multithreading, streams, lambdas, functional interfaces, and modern Java features

15 questions30 min

This advanced-level quiz is designed for experienced Java developers. It covers complex topics including concurrency, thread safety, the Stream API, lambda expressions, functional programming, Optional, and modern Java features from Java 8+.

Perfect for developers preparing for senior positions or those who want to master advanced Java concepts.

0/15 checked
  1. 01

    What is the difference between synchronized and ReentrantLock?

  2. 02

    What is the purpose of the volatile keyword?

  3. 03

    What will be the output of: Stream.of(1,2,3).map(n -> n * 2).filter(n -> n > 4).count();

  4. 04

    What is a functional interface in Java?

  5. 05

    What is the difference between Callable and Runnable?

  6. 06

    What is the purpose of CompletableFuture?

  7. 07

    What is the difference between map() and flatMap() in Streams?

  8. 08

    What is the happens-before relationship in Java Memory Model?

  9. 09

    What is the purpose of Optional in Java?

  10. 10

    What is the difference between parallelStream() and stream()?

  11. 11

    What is the purpose of the @FunctionalInterface annotation?

  12. 12

    What is the ConcurrentHashMap's approach to thread safety?

  13. 13

    What does the reduce() operation do in streams?

  14. 14

    What is the purpose of the CountDownLatch?

  15. 15

    What is method reference in Java 8?