OOP, collections, concurrency, JVM internals, functional programming, exception handling, serialization, design patterns, and modern Java features.
1JuniorOOPTCSInfosysWiproAmazon
Four Pillars of OOP
Explain the four pillars of OOP in Java with examples. How does Java implement each?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
2JuniorOOPGoogleAmazonFlipkart
Abstract Class vs Interface
When do you use an abstract class vs an interface in Java? How has this changed since Java 8?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
3SeniorOOPGoogleMicrosoftAmazon
Composition vs Inheritance
Why do experienced developers prefer composition over inheritance? Give a real-world example.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
4SeniorOOPGoldman SachsMorgan StanleyAmazon
equals(), hashCode(), and the Contract
Why must you override hashCode() when you override equals()? What happens if you don't?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
5SeniorOOPGoogleNetflixJPMC
Immutability in Java
How do you create an immutable class in Java? Why is immutability important in concurrent systems?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
6SeniorOOPAmazonGoogleMicrosoftUber
SOLID Principles
Explain the SOLID principles with Java examples. Which one do you think is most commonly violated?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
7SeniorOOPGoogleAmazonGoldman Sachs
Generics and Type Erasure
How do Java generics work under the hood? What is type erasure and what are its implications?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
8JuniorOOPTCSInfosysCognizantJPMC
final, finally, finalize
Explain the difference between final, finally, and finalize in Java.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
9SeniorCollectionsAmazonGoldman SachsGoogleJPMC
HashMap Internals
How does HashMap work internally in Java? Walk through a put() and get() operation.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Compare ConcurrentHashMap, Hashtable, and Collections.synchronizedMap(). Which should you use?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
11JuniorCollectionsAmazonTCSFlipkart
ArrayList vs LinkedList
When would you use ArrayList vs LinkedList? What are the time complexities?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
12JuniorCollectionsAmazonMicrosoftGoldman Sachs
TreeMap vs HashMap vs LinkedHashMap
Compare TreeMap, HashMap, and LinkedHashMap. When do you use each?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
13JuniorCollectionsAmazonTCSFlipkartJPMC
Comparable vs Comparator
What's the difference between Comparable and Comparator? When do you use each?
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What are fail-fast and fail-safe iterators? Give examples of each.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
15SeniorCollectionsGoogleAmazonNetflix🔒 Premium
Stream Collectors and Grouping
Show advanced Stream collector patterns — groupingBy, partitioning, custom collectors.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
16JuniorCollectionsTCSInfosysWipro🔒 Premium
Collections Utility Methods
What are the key utility methods in java.util.Collections and java.util.Arrays?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What are lambda expressions in Java? What is a functional interface?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain Java Streams with practical examples of map, filter, flatMap, and reduce.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
How does Optional work? Show the right and wrong ways to use it.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain the four types of method references in Java with examples.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
When should you use parallel streams? What are the pitfalls?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain lazy evaluation in Streams. How does short-circuiting work?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Show how to compose functions in Java. What's andThen vs compose?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain specialized functional interfaces (IntFunction, BiConsumer, etc.) and when to use them.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What are the different ways to create threads in Java? Which should you use?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain synchronized, volatile, and atomic classes. When do you use each?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain the different thread pool types. How do you size a thread pool?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Show practical CompletableFuture patterns — chaining, combining, error handling.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain deadlock, livelock, and starvation. How do you prevent deadlocks?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Implement the producer-consumer pattern in Java. What data structures do you use?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
When would you use ReentrantLock over synchronized?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain CountDownLatch, CyclicBarrier, and Semaphore with real-world use cases.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What is ThreadLocal? When is it useful and what are the pitfalls?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
34SeniorConcurrencyGoogleNetflixAmazon🔒 Premium
Virtual Threads (Project Loom)
What are virtual threads in Java 21? How do they differ from platform threads?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain the exception hierarchy in Java. What's the difference between checked and unchecked exceptions?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What is try-with-resources? How does it work with AutoCloseable?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
What are exception handling anti-patterns and best practices in Java?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain multi-catch blocks and exception chaining in Java.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Java Serialization: Serializable and serialVersionUID
How does Java serialization work? What is serialVersionUID and why does it matter?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
How do you use Jackson for JSON serialization in Java? Show common patterns and pitfalls.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
41SeniorSerializationGoogleUberNetflix🔒 Premium
Protocol Buffers and Binary Serialization
Compare JSON, Protocol Buffers, and Avro for data serialization. When do you use each?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
42SeniorSerializationGoldman SachsJPMC🔒 Premium
Externalizable vs Serializable
What's the difference between Externalizable and Serializable? When would you use each?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain the JVM memory model. What goes on heap, stack, and metaspace?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain garbage collection in Java. Compare G1, ZGC, and CMS collectors.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
45SeniorJVM & MemoryGoogleAmazonJPMC🔒 Premium
ClassLoader and Class Loading
Explain the ClassLoader hierarchy and how class loading works in Java.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
How does JIT compilation work in the JVM? What's the difference between C1 and C2 compilers?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
How can memory leaks happen in Java despite garbage collection? How do you detect them?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
How does the String pool work? What's the difference between String, StringBuilder, and StringBuffer?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Show different ways to implement Singleton in Java. Which is thread-safe?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain Factory and Abstract Factory patterns with practical Java examples.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Implement the Builder pattern in Java. When should you use it?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Implement the Observer pattern. How is it used in real systems?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
53SeniorDesign PatternsAmazonGoogleJPMC🔒 Premium
Strategy Pattern
Implement the Strategy pattern. How does it relate to functional programming in Java?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
Explain the Decorator pattern. Where is it used in the Java standard library?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
55SeniorDesign PatternsAmazonJPMCGoogle🔒 Premium
Template Method Pattern
Implement the Template Method pattern. How is it different from Strategy?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
56JuniorModern JavaGoogleAmazonNetflix🔒 Premium
Records (Java 16+)
What are Java Records? When should and shouldn't you use them?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
57SeniorModern JavaGoogleAmazon🔒 Premium
Sealed Classes (Java 17)
What are sealed classes? How do they improve domain modeling?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
58SeniorModern JavaGoogleAmazonNetflix🔒 Premium
Pattern Matching (instanceof and switch)
Explain pattern matching in Java 16-21. How does it improve code?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
59JuniorModern JavaAmazonTCSFlipkart🔒 Premium
Switch Expressions (Java 14+)
How do switch expressions differ from switch statements? Show the modern syntax.
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
60JuniorModern JavaAmazonFlipkartTCS🔒 Premium
Text Blocks and New String Methods
What are text blocks in Java? What useful String methods were added in Java 11-17?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
61JuniorModern JavaAmazonGoogleFlipkart🔒 Premium
var and Local Variable Type Inference
How does var work in Java 10+? When should and shouldn't you use it?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...
🔒
62JuniorModern JavaAmazonTCSFlipkart🔒 Premium
New Collection Factory Methods
What collection factory methods were added in Java 9-16? How do they improve code?
🧠 What they're really testing
This section reveals the deeper intent behind the question and what senior interviewers look for in a strong answer.
The ideal answer covers architectural trade-offs, demonstrates production experience, and shows awareness of failure modes. Start by explaining the core concept, then walk through a real scenario...