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 5 of 8)

  1. Which statement about Deque for Sliding Window Maximum is the strongest interview answer?Multiple choiceEasy
  2. Which practice avoids a common mistake with Lambdas and Functional Interfaces?Multiple choiceMedium
  3. When should a Java developer choose Checked vs Unchecked Exceptions deliberately?Multiple choiceMedium
  4. In Java, which comparison about Union-Find and Disjoint Set is accurate?Multiple choiceEasy
  5. What deeper point about NIO Files and Path should a senior Java developer mention?Multiple choiceHard
  6. Which statement about try-with-resources is the strongest interview answer?Multiple choiceEasy
  7. What deeper point about map, flatMap, and reduce should a senior Java developer mention?Multiple choiceHard
  8. When should a Java developer choose Hash Tables and Hashing deliberately?Multiple choiceMedium
  9. What deeper point about Top-K with a Heap should a senior Java developer mention?Multiple choiceHard
  10. Which practice avoids a common mistake with Binary Search Tree?Multiple choiceMedium
  11. In Java, which comparison about Stack Fundamentals is accurate?Multiple choiceEasy
  12. In Java, which comparison about static, final, and Initialization is accurate?Multiple choiceEasy
  13. When should a Java developer choose Collisions and Load Factor deliberately?Multiple choiceMedium
  14. When should a Java developer choose Dynamic Arrays and Resizing deliberately?Multiple choiceMedium
  15. What deeper point about try-with-resources should a senior Java developer mention?Multiple choiceHard
  16. When should a Java developer choose Parallel Streams deliberately?Multiple choiceMedium
  17. In Java, which comparison about Breadth-First Search is accurate?Multiple choiceEasy
  18. Which practice avoids a common mistake with Streams Basics?Multiple choiceMedium
  19. When should a Java developer choose Lambdas and Functional Interfaces deliberately?Multiple choiceMedium
  20. What deeper point about Trie and Prefix Tree should a senior Java developer mention?Multiple choiceHard
  21. Which practice avoids a common mistake with Parallel Streams?Multiple choiceMedium
  22. When should a Java developer choose Streams Basics deliberately?Multiple choiceMedium
  23. What deeper point about Stack Fundamentals should a senior Java developer mention?Multiple choiceHard
  24. When should a Java developer choose Tree Fundamentals deliberately?Multiple choiceMedium
  25. In Java, which comparison about Top-K with a Heap is accurate?Multiple choiceEasy
  26. When should a Java developer choose Stack Fundamentals deliberately?Multiple choiceMedium
  27. Which practice avoids a common mistake with try-with-resources?Multiple choiceMedium
  28. In Java, which comparison about Hash Tables and Hashing is accurate?Multiple choiceEasy
  29. Which statement about Adjacency List vs Adjacency Matrix is the strongest interview answer?Multiple choiceEasy
  30. Which practice avoids a common mistake with Two-Dimensional Arrays?Multiple choiceMedium
  31. What deeper point about Binary Tree Traversals should a senior Java developer mention?Multiple choiceHard
  32. In Java, which comparison about Monotonic Stack is accurate?Multiple choiceEasy
  33. When should a Java developer choose JDBC and Prepared Statements deliberately?Multiple choiceMedium
  34. Which practice avoids a common mistake with static, final, and Initialization?Multiple choiceMedium
  35. Which statement about Design Patterns and SOLID is the strongest interview answer?Multiple choiceEasy
  36. Which practice avoids a common mistake with Dynamic Arrays and Resizing?Multiple choiceMedium
  37. When should a Java developer choose Balanced Search Trees deliberately?Multiple choiceMedium
  38. Which practice avoids a common mistake with Heap Operations and Invariants?Multiple choiceMedium
  39. What deeper point about static, final, and Initialization should a senior Java developer mention?Multiple choiceHard
  40. What deeper point about StringBuilder vs StringBuffer should a senior Java developer mention?Multiple choiceHard
  41. Which statement about Doubly Linked Lists is the strongest interview answer?Multiple choiceEasy
  42. Which statement about Monotonic Stack is the strongest interview answer?Multiple choiceEasy
  43. What deeper point about Doubly Linked Lists should a senior Java developer mention?Multiple choiceHard
  44. In Java, which comparison about Arrays and Indexed Access is accurate?Multiple choiceEasy
  45. Which statement about static, final, and Initialization is the strongest interview answer?Multiple choiceEasy
  46. What deeper point about Lambdas and Functional Interfaces should a senior Java developer mention?Multiple choiceHard
  47. In Java, which comparison about Checked vs Unchecked Exceptions is accurate?Multiple choiceEasy
  48. Which practice avoids a common mistake with Tree Fundamentals?Multiple choiceMedium
  49. When should a Java developer choose Singly Linked Lists deliberately?Multiple choiceMedium
  50. When should a Java developer choose Depth-First Search deliberately?Multiple choiceMedium