Skip to content
Sharp

Java Interview Questions interview questions

Collections • ArrayDeque as a Queue, Collections • ArrayDeque as a Stack, Collections • ArrayList vs LinkedList, Collections • Comparable vs Comparator, Collections • HashMap Internals, Collections • HashSet Membership and Deduplication

400 questions with answers and explanations

Questions (page 7 of 8)

  1. When should a Java developer choose Heap Operations and Invariants deliberately?Multiple choiceMedium
  2. In Java, which comparison about Topological Sort is accurate?Multiple choiceEasy
  3. In Java, which comparison about NIO Files and Path is accurate?Multiple choiceEasy
  4. When should a Java developer choose Linked List Reversal deliberately?Multiple choiceMedium
  5. Which practice avoids a common mistake with Singly Linked Lists?Multiple choiceMedium
  6. When should a Java developer choose Binary Tree Traversals deliberately?Multiple choiceMedium
  7. In Java, which comparison about Queue Fundamentals is accurate?Multiple choiceEasy
  8. When should a Java developer choose Design Patterns and SOLID deliberately?Multiple choiceMedium
  9. In Java, which comparison about Tree Fundamentals is accurate?Multiple choiceEasy
  10. When should a Java developer choose Prefix Sums on Arrays deliberately?Multiple choiceMedium
  11. Which practice avoids a common mistake with StringBuilder vs StringBuffer?Multiple choiceMedium
  12. Which statement about Union-Find and Disjoint Set is the strongest interview answer?Multiple choiceEasy
  13. In Java, which comparison about Balanced Search Trees is accurate?Multiple choiceEasy
  14. In Java, which comparison about Binary Search Tree is accurate?Multiple choiceEasy
  15. Which statement about Stack Fundamentals is the strongest interview answer?Multiple choiceEasy
  16. Which practice avoids a common mistake with Checked vs Unchecked Exceptions?Multiple choiceMedium
  17. In Java, which comparison about Prefix Sums on Arrays is accurate?Multiple choiceEasy
  18. Which practice avoids a common mistake with Stack Fundamentals?Multiple choiceMedium
  19. In Java, which comparison about Binary Tree Traversals is accurate?Multiple choiceEasy
  20. Which practice avoids a common mistake with Union-Find and Disjoint Set?Multiple choiceMedium
  21. Which practice avoids a common mistake with map, flatMap, and reduce?Multiple choiceMedium
  22. Which statement about Singly Linked Lists is the strongest interview answer?Multiple choiceEasy
  23. Which statement about Tree Fundamentals is the strongest interview answer?Multiple choiceEasy
  24. What deeper point about Parallel Streams should a senior Java developer mention?Multiple choiceHard
  25. What deeper point about Streams Basics should a senior Java developer mention?Multiple choiceHard
  26. Which practice avoids a common mistake with Primitive Types and Wrappers?Multiple choiceMedium
  27. Which practice avoids a common mistake with String Immutability?Multiple choiceMedium
  28. When should a Java developer choose map, flatMap, and reduce deliberately?Multiple choiceMedium
  29. Which practice avoids a common mistake with Optional?Multiple choiceMedium
  30. What deeper point about Optional should a senior Java developer mention?Multiple choiceHard
  31. Which statement about java.time API is the strongest interview answer?Multiple choiceEasy
  32. Which statement about Class Loading and Initialization is the strongest interview answer?Multiple choiceEasy
  33. What deeper point about java.time API should a senior Java developer mention?Multiple choiceHard
  34. When should a Java developer choose Reflection deliberately?Multiple choiceMedium
  35. What deeper point about Polymorphism, Overloading, and Overriding should a senior Java developer mention?Multiple choiceHard
  36. Which practice avoids a common mistake with Inheritance vs Composition?Multiple choiceMedium
  37. What deeper point about Abstraction should a senior Java developer mention?Multiple choiceHard
  38. When should a Java developer choose Inheritance vs Composition deliberately?Multiple choiceMedium
  39. Which statement about Interface vs Abstract Class is the strongest interview answer?Multiple choiceEasy
  40. In Java, which comparison about Inheritance vs Composition is accurate?Multiple choiceEasy
  41. When should a Java developer choose Polymorphism, Overloading, and Overriding deliberately?Multiple choiceMedium
  42. When should a Java developer choose Encapsulation deliberately?Multiple choiceMedium
  43. Which statement about Abstraction is the strongest interview answer?Multiple choiceEasy
  44. When should a Java developer choose Generics and Wildcards deliberately?Multiple choiceMedium
  45. Which practice avoids a common mistake with Garbage Collection?Multiple choiceMedium
  46. Which statement about Generics and Wildcards is the strongest interview answer?Multiple choiceEasy
  47. Which practice avoids a common mistake with Reflection?Multiple choiceMedium
  48. When should a Java developer choose Interface vs Abstract Class deliberately?Multiple choiceMedium
  49. What deeper point about Garbage Collection should a senior Java developer mention?Multiple choiceHard
  50. When should a Java developer choose Garbage Collection deliberately?Multiple choiceMedium