← All topics

β˜• Interview Prep

Java

equals and hashCode, collections internals, strings, exceptions, generics, streams, concurrency, the JVM and modern Java: what Java and Spring teams test.

πŸ“˜ Learn it from scratch

Visual, hands-on lessons for every pattern in this topic. Do the lesson, then come back and the questions click.

100 questions, most asked first

Ordered so the most useful questions for learning each pattern come first.

#3String immutability, the string pool, and == vs equalsCore Java & OOPEasyFree#4Abstract class vs interfaceCore Java & OOPEasyFree#5ArrayList vs LinkedListCollectionsEasyFree#6final vs finally vs finalizeCore Java & OOPEasyFree#8JDK vs JRE vs JVMJVM & memoryEasyFree#10Overloading vs overridingCore Java & OOPEasyFreeUnlock 24 more Java questions Β· all 1,200 questions for $39/year (about 11Β’ a day)See full access#11String vs StringBuilder vs StringBufferCore Java & OOPEasyπŸ”’#12What does static mean?Core Java & OOPEasyπŸ”’#13Comparable vs ComparatorCollectionsEasyπŸ”’#21Is Java pass-by-value or pass-by-reference?Core Java & OOPEasyπŸ”’#23try-with-resources and AutoCloseableExceptionsEasyπŸ”’#24HashSet vs LinkedHashSet vs TreeSetCollectionsEasyπŸ”’#26public, protected, package-private and privateCore Java & OOPEasyπŸ”’#29What are records, and when should you use them?Modern JavaEasyπŸ”’#32HashMap vs LinkedHashMap vs TreeMapCollectionsEasyπŸ”’#36Thread lifecycle and statesConcurrencyEasyπŸ”’#41Polymorphism and dynamic dispatchCore Java & OOPEasyπŸ”’#54Enums are full classesCore Java & OOPEasyπŸ”’#62Integer overflow and numeric typesCore Java & OOPEasyπŸ”’#63Why not use double for money?Core Java & OOPEasyπŸ”’#64Local variable type inference with varModern JavaEasyπŸ”’#70The Builder patternCore Java & OOPEasyπŸ”’#77Maven vs Gradle and dependency managementSpring & ecosystemEasyπŸ”’#80Configuration and profiles in Spring BootSpring & ecosystemEasyπŸ”’#84String.split surprisesCore Java & OOPEasyπŸ”’#87Method referencesStreams & lambdasEasyπŸ”’#89Why use ArrayDeque instead of Stack?CollectionsEasyπŸ”’#97Logging well in Java servicesSpring & ecosystemEasyπŸ”’#98Handling null and NullPointerExceptionCore Java & OOPEasyπŸ”’#99EnumMap and EnumSetCollectionsEasyπŸ”’