Skip to main content
JourneyUncommon

Java Intermediate

Streams, generics, concurrency: interview-grade Java.

Questions
15
Tier
Intermediate
Language
Java
Time
~18 min

Difficulty mix: 3 easy, 7 medium and 5 hard. The questions are drawn from the Java library at the moment you start, so sitting the test twice does not give you the same paper.

What this test can pull from

44 Java topics are in scope. These are the real topic labels on the questions.

  • stream pipelines
  • primitives and char width
  • if switch loops
  • try-with-resources
  • main entry point
  • final and constants
  • class loading delegation
  • String.intern and pool
  • sealed types usage
  • ExecutorService usage
  • functional interfaces
  • CompletableFuture composition
  • pattern matching switch instanceof
  • bytecode and operand stack
  • HashMap internals treeify
  • records and compact constructors
  • AQS internals
  • ConcurrentHashMap
  • ZGC vs G1
  • Collectors toMap groupingBy
  • Optional patterns
  • Comparator comparing thenComparing
  • synchronized monitors biased locks
  • virtual threads carrier pinning
  • final-field publication
  • volatile semantics
  • Lambdas and method refs
  • reflection cost
  • ThreadLocal lifecycle leaks
  • JIT HotSpot tiered

Questions of the kind this test asks

Six real Java questions from the same pool, snippet included. The answer options and explanations are not shown here. Those come after you attempt them.

Prefer to pick your own questions? Browse all Java questions. See the other 10 tests.