← Back to Home

Java Interview Questions — What Senior Engineers Need to Know

Java interviews at the senior level go far beyond syntax. Interviewers expect you to reason about JVM internals, garbage collection trade-offs, the Java Memory Model, and how the collections framework actually works under the hood. Surface-level answers about “HashMap uses hashing” won’t cut it.

These 60 questions cover the concepts that consistently appear in senior Java interviews at top companies: concurrency primitives, class loading, generics and type erasure, functional interfaces, and modern Java features from records to virtual threads. Each question is designed to test whether you can explain why, not just what.

All 60 Questions

JVM vs JRE vs JDKWhat are the differences between JVM, JRE, and JDK?Java Platform IndependenceWhy is Java a platform-independent language?How JVM WorksHow does the JVM work?Main Features of JavaWhat are the main features of Java?public static void mainWhat is the significance of 'public static void main(String[] args)' in Java?String Constant PoolWhat is the String Constant Pool in Java?String ImmutabilityWhy are Strings immutable in Java?StringBuffer vs StringBuilderWhat is the difference between StringBuffer and StringBuilder?hashCode() and equals()What is the importance of hashCode() and equals() methods in Java?Checked vs Unchecked ExceptionsWhat is the difference between checked and unchecked exceptions in Java?Wrapper ClassesWhat are wrapper classes in Java?Why Java is Not Pure OOPWhy is Java not considered a pure object-oriented programming language?Abstract Class vs InterfaceWhat is the difference between an abstract class and an interface in Java?Marker InterfacesWhat are marker interfaces in Java?Java Collections FrameworkWhat are collections in Java?ArrayList vs VectorWhat are the differences between ArrayList and Vector?finalize() MethodWhat is the finalize() method in Java?Comparable vs ComparatorWhat is the difference between the Comparable and Comparator interfaces?Inner ClassesWhat is an inner class in Java?final vs finally vs finalize()What is the difference between final, finally, and finalize() in Java?== vs equals()What is the difference between '==' and the equals() method in Java?Method Overloading vs OverridingWhat is method overloading and method overriding in Java?HashMap vs HashtableWhat is the difference between HashMap and Hashtable?ArrayList vs LinkedListWhat is the difference between ArrayList and LinkedList?Java Reflection APIWhat is the Java Reflection API?JVM Memory AreasWhat are the different memory areas allocated by the JVM?throw vs throwsWhat is the difference between throw and throws in Java?Singleton Pattern in JavaWhat is a Singleton class and how do you create one in Java?Java 8 Stream APIWhat are the main features of the Java 8 Stream API?Fail-fast vs Fail-safe IteratorsWhat is the difference between fail-fast and fail-safe iterators?Process vs Thread in JavaWhat is the difference between a process and a thread in Java?Creating Threads in JavaWhat are the different ways to create a thread in Java?Synchronization in JavaWhat is synchronization in Java?Deadlock in JavaWhat is deadlock in Java and how can it be avoided?volatile KeywordWhat is the volatile keyword in Java?transient KeywordWhat is the transient keyword in Java?Serialization and DeserializationWhat is serialization and deserialization in Java?Functional InterfacesWhat are functional interfaces in Java?Lambda ExpressionsWhat are lambda expressions in Java?Collection vs CollectionsWhat is the difference between Collection and Collections in Java?Set vs ListWhat is the difference between Set and List in Java?HashSet vs TreeSetWhat is the difference between HashSet and TreeSet?Diamond Problem in JavaWhat is the diamond problem in Java?Dependency Injection in JavaWhat is dependency injection in Java?Shallow Copy vs Deep Copy in JavaWhat is the difference between shallow copy and deep copy in Java?Design Patterns in JavaWhat are design patterns in Java?Factory Design PatternWhat is the Factory design pattern?Builder Design PatternWhat is the Builder design pattern?Heap vs Stack MemoryWhat is the difference between Heap and Stack memory in Java?Garbage Collection in JavaWhat is garbage collection in Java?Types of Garbage CollectorsWhat are the different types of garbage collectors in Java?wait() vs sleep()What is the difference between wait() and sleep() in Java?notify() vs notifyAll()What is the difference between notify() and notifyAll() in Java?Immutable Class in JavaWhat is an immutable class and how do you create one?String vs StringBuilder vs StringBufferWhat is the difference between String, StringBuilder, and StringBuffer?Static vs Instance VariablesWhat is the difference between static and instance variables in Java?super KeywordWhat is the purpose of the super keyword in Java?this KeywordWhat is the purpose of the this keyword in Java?Java GenericsWhat are generics in Java?Type Erasure in GenericsWhat is type erasure in Java generics?

How to Prepare

Focus on understanding concepts deeply enough to explain them in your own words. For each topic, practice articulating the trade-offs and real-world applications — interviewers care about practical judgment, not textbook definitions.

Related Topics

  • CS Fundamentals Interview Questions
  • Frameworks Interview Questions
  • Design Principles Interview Questions
  • Technical Interview Practice

Test Your Knowledge

Take a free AI-graded assessment across multiple domains. No signup required.

Start Free Assessment
GrindQuestionsAITechnical interview assessment
TermsPrivacyAbout