Java Interview Cheat Sheet – Complete 360+
Questions
Part 1: Java Basics
• What is Java?
• Features of Java (Platform-independent, OOP, Multithreading, etc.)
• JDK vs JRE vs JVM
• Data types, Variables, Operators, Loops, Conditionals
• Access Modifiers
• OOP Concepts: Class, Object, Inheritance, Polymorphism, Encapsulation, Abstraction
Part 2: Java OOP & Core Concepts
• Constructors, Method Overloading & Overriding
• this keyword, super keyword
• final keyword (class, method, variable)
• static keyword (method, variable, block)
• instanceof operator
• Wrapper classes, Autoboxing/Unboxing
• String, StringBuilder, StringBuffer
Part 3: Java Collections
• Collection framework: List, Set, Map, Queue
• ArrayList vs LinkedList vs Vector vs Stack
• HashMap vs LinkedHashMap vs TreeMap
• HashSet vs TreeSet vs LinkedHashSet
• Iterator, ListIterator, Fail-fast vs Fail-safe
• Comparable vs Comparator
Part 4: Exception Handling
• Checked vs Unchecked exceptions
• try-catch-finally
• throw vs throws
• Custom exceptions
Part 5: Java Generics
• Generic classes and methods
• Bounded type parameters ( <T extends Class> )
1
• Wildcards ( ? extends , ? super )
Part 6: Java I/O & Serialization
• Streams (InputStream, OutputStream, Reader, Writer)
• BufferedReader, BufferedWriter
• Object serialization
• transient keyword, serialVersionUID
• Externalizable interface
Part 7: Java Concurrency & Multithreading
• Thread, Runnable, Callable, Future
• Thread lifecycle and states
• Thread priority, Daemon threads
• Synchronization, synchronized methods vs blocks
• Locks: ReentrantLock, ReadWriteLock
• ExecutorService, ThreadPool
• ThreadLocal
• Deadlock, Livelock, Starvation
Part 8: Java 8+ Features
• Lambda expressions, Functional interfaces
• Stream API: filter, map, reduce, collect, parallelStream
• Optional, method references, default & static methods in interfaces
• Date/Time API (LocalDate, LocalTime, LocalDateTime, ZonedDateTime, Period, Duration)
• CompletableFuture
Part 9: Design Patterns
• Creational: Singleton, Factory, Builder
• Behavioral: Observer, Strategy
• Architectural: MVC
• Best practices: immutability, SOLID principles, interface over implementation
Part 10: Advanced Java Internals
• Reflection, ClassLoader
• Annotations (built-in & custom)
• JVM memory areas: Heap, Stack, Method Area, Native memory
• Garbage collection types (Serial, Parallel, CMS, G1)
• Strong, Weak, Soft, Phantom references
• volatile, transient, final
• Shallow vs Deep copy
2
Part 11: Edge Cases & Interview Tricks
• String pool vs heap
• Autoboxing pitfalls ( == vs .equals() )
• HashMap vs ConcurrentHashMap
• Synchronization pitfalls & thread safety
• Fail-fast vs Fail-safe iterators
• Serialization of singleton objects
• Shallow vs deep copy, mutable vs immutable objects
• Last-minute memory and concurrency tips
PDF Cheat Sheet Features
1. Topic-wise grouping
2. Question → 3-mark answer format
3. Tricky interview tips highlighted
4. Quick tables for HashMap, Collections, Thread states, etc.
5. Modern Java features marked with ⚡ for attention