Java Interview Questions
Java interview questions on language fundamentals, object-oriented design, the Collections Framework, exception handling and concurrency — a staple of backend and enterprise technical interviews.
Topics
- FundamentalsPrimitives and wrappers, the String pool, pass-by-value semantics and the object model — the language basics every Java interview starts with. 4 subtopics
- Object-Oriented ProgrammingClasses and objects, inheritance and polymorphism, interfaces vs abstract classes and the equals/hashCode contract — the object model at the heart of every Java interview. 5 subtopics
- GenericsType parameters, bounded types and wildcards (PECS) and the type erasure that underpins them — compile-time type safety for collections and APIs. 3 subtopics
- CollectionsLists, Sets and Maps, their implementations and trade-offs, iteration and ordering — the Collections Framework that powers most Java code. 5 subtopics
- Streams & FunctionalLambdas and functional interfaces, the Stream API, Collectors and Optional — the functional style introduced in Java 8 that modern code is written in. 4 subtopics
- ExceptionsChecked vs unchecked exceptions, try/catch/finally, try-with-resources and designing robust error handling in Java. 3 subtopics
- ConcurrencyThreads, synchronization, the memory model, executors and the high-level concurrency utilities used to write correct multithreaded Java. 5 subtopics
- JVM InternalsThe heap and stack, garbage collection and class loading — how the Java Virtual Machine runs, manages memory and loads your code. 3 subtopics
- Modern JavaRecords, sealed classes and pattern matching for switch — the language features from Java 14+ that make recent Java more concise and expressive. 8 subtopics