Volume III · Interview Preparation

The Interview Corner.
Java, the way it's asked.

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.

Seven tracks

Pick a topic. Go deep.

§ I

Core Java

Foundational

Language fundamentals interviewers keep coming back to — primitives vs wrappers, `==` vs `equals`, `String` interning, immutability, exception hierarchy, and the classloader.

Primitives & wrappersString poolequals & hashCodeExceptionsClassloader
42 questionsStart
§ II

Object-Oriented Programming

Foundational

Encapsulation, inheritance, polymorphism and abstraction — plus the modern additions: sealed types, records, and pattern matching for `switch`.

Inheritance vs compositionAbstract vs interfaceRecordsSealed classesSOLID
36 questionsStart
§ III

Collections & Generics

Intermediate

The Collections Framework top to bottom: `ArrayList` vs `LinkedList`, `HashMap` internals, `TreeMap`, `PriorityQueue`, and bounded wildcards (`? extends` / `? super`).

HashMap internalsFail-fast iteratorsComparator chainsGenerics & PECSStreams API
48 questionsStart
§ IV

Concurrency & Multithreading

Advanced

Threads, the memory model, `synchronized` vs `Lock`, `volatile`, `ExecutorService`, `CompletableFuture`, and virtual threads (Project Loom).

JMM & happens-beforeLocks & atomicsThread poolsCompletableFutureVirtual threads
40 questionsStart
§ V

JVM Internals

Advanced

How the JVM actually runs your code — heap regions, garbage collectors (G1, ZGC, Shenandoah), JIT tiers, and the tuning flags that matter.

Heap & GCClass loadingJIT compilationEscape analysisCommon flags
28 questionsComing soon
§ VI

Spring & Spring Boot

Intermediate

Dependency injection, bean scopes, AOP, Spring MVC vs WebFlux, transaction propagation, and how Spring Boot auto-configuration actually works.

IoC & DIBean lifecycle@TransactionalSpring MVCAuto-configuration
38 questionsComing soon
§ VII

System Design (Java-flavored)

Advanced

Design questions the way a Java engineer answers them: caching with Caffeine, messaging with Kafka, JPA vs JDBC, connection pools, and rate limiting.

Caching strategiesKafka basicsJPA vs JDBCIdempotencyRate limiting
24 questionsComing soon
Coming next

Company-tagged questions

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.

Amazon Google TCS Infosys Accenture Wipro Cognizant
Question of the day
Why is `String` immutable in Java, and what would break if it weren't?

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