A curated bank of 256+ real interview questions grouped by topic — from the fundamentals every screen touches to JVM internals and system design in a Java shop. Every question comes with an explanation, a runnable snippet where it helps, and a link back to the lesson it came from.
Language fundamentals interviewers keep coming back to — primitives vs wrappers, `==` vs `equals`, `String` interning, immutability, exception hierarchy, and the classloader.
Encapsulation, inheritance, polymorphism and abstraction — plus the modern additions: sealed types, records, and pattern matching for `switch`.
The Collections Framework top to bottom: `ArrayList` vs `LinkedList`, `HashMap` internals, `TreeMap`, `PriorityQueue`, and bounded wildcards (`? extends` / `? super`).
Threads, the memory model, `synchronized` vs `Lock`, `volatile`, `ExecutorService`, `CompletableFuture`, and virtual threads (Project Loom).
How the JVM actually runs your code — heap regions, garbage collectors (G1, ZGC, Shenandoah), JIT tiers, and the tuning flags that matter.
Dependency injection, bean scopes, AOP, Spring MVC vs WebFlux, transaction propagation, and how Spring Boot auto-configuration actually works.
Design questions the way a Java engineer answers them: caching with Caffeine, messaging with Kafka, JPA vs JDBC, connection pools, and rate limiting.
Filter the bank by the company that asked it — Amazon, Google, TCS, Infosys, Accenture — and by your experience band (0–2y, 3–5y, 5y+). We're tagging questions as they land.
Hint: think about the `String` pool, thread safety, `HashMap` keys, and class loading. A good answer names at least three concrete consequences.
Practice more like this