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

  1. Which practice avoids a common mistake with TreeSet and NavigableSet?Multiple choiceMedium
  2. Which practice avoids a common mistake with Comparable vs Comparator?Multiple choiceMedium
  3. When should a Java developer choose Comparable vs Comparator deliberately?Multiple choiceMedium
  4. When should a Java developer choose CopyOnWriteArrayList deliberately?Multiple choiceMedium
  5. What deeper point about ExecutorService, Future, and CompletableFuture should a senior Java developer mention?Multiple choiceHard
  6. Which statement about LinkedHashMap and Iteration Order is the strongest interview answer?Multiple choiceEasy
  7. Which practice avoids a common mistake with PriorityQueue and Heap Basics?Multiple choiceMedium
  8. When should a Java developer choose Deadlocks and Race Conditions deliberately?Multiple choiceMedium
  9. Which statement about equals() and hashCode() Contract is the strongest interview answer?Multiple choiceEasy
  10. Which practice avoids a common mistake with Thread Lifecycle and Creation?Multiple choiceMedium
  11. Which practice avoids a common mistake with HashSet vs TreeSet?Multiple choiceMedium
  12. Which statement about ConcurrentSkipListMap is the strongest interview answer?Multiple choiceEasy
  13. What deeper point about equals() and hashCode() Contract should a senior Java developer mention?Multiple choiceHard
  14. What deeper point about TreeSet and NavigableSet should a senior Java developer mention?Multiple choiceHard
  15. In Java, which comparison about HashMap Internals is accurate?Multiple choiceEasy
  16. What deeper point about ConcurrentHashMap and Concurrent Collections should a senior Java developer mention?Multiple choiceHard
  17. In Java, which comparison about HashSet Membership and Deduplication is accurate?Multiple choiceEasy
  18. When should a Java developer choose BlockingQueue and Producer-Consumer deliberately?Multiple choiceMedium
  19. Which statement about Comparable vs Comparator is the strongest interview answer?Multiple choiceEasy
  20. In Java, which comparison about Java Memory Model, volatile, and synchronized is accurate?Multiple choiceEasy
  21. Which statement about BlockingQueue and Producer-Consumer is the strongest interview answer?Multiple choiceEasy
  22. What deeper point about LRU Cache with LinkedHashMap should a senior Java developer mention?Multiple choiceHard
  23. What deeper point about LinkedHashMap and Iteration Order should a senior Java developer mention?Multiple choiceHard
  24. When should a Java developer choose equals() and hashCode() Contract deliberately?Multiple choiceMedium
  25. Which statement about ExecutorService, Future, and CompletableFuture is the strongest interview answer?Multiple choiceEasy
  26. When should a Java developer choose HashSet Membership and Deduplication deliberately?Multiple choiceMedium
  27. Which statement about Deadlocks and Race Conditions is the strongest interview answer?Multiple choiceEasy
  28. Which statement about TreeMap and NavigableMap is the strongest interview answer?Multiple choiceEasy
  29. In Java, which comparison about Dynamic Arrays and Resizing is accurate?Multiple choiceEasy
  30. Which statement about Streams Basics is the strongest interview answer?Multiple choiceEasy
  31. Which practice avoids a common mistake with Balanced Search Trees?Multiple choiceMedium
  32. Which statement about Checked vs Unchecked Exceptions is the strongest interview answer?Multiple choiceEasy
  33. Which statement about String Immutability is the strongest interview answer?Multiple choiceEasy
  34. When should a Java developer choose Circular Queue and Ring Buffer deliberately?Multiple choiceMedium
  35. In Java, which comparison about Doubly Linked Lists is accurate?Multiple choiceEasy
  36. When should a Java developer choose Binary Search Tree deliberately?Multiple choiceMedium
  37. When should a Java developer choose Primitive Types and Wrappers deliberately?Multiple choiceMedium
  38. Which statement about Circular Queue and Ring Buffer is the strongest interview answer?Multiple choiceEasy
  39. What deeper point about Sliding Window on Arrays should a senior Java developer mention?Multiple choiceHard
  40. What deeper point about Arrays and Indexed Access should a senior Java developer mention?Multiple choiceHard
  41. Which statement about Fast and Slow Pointers is the strongest interview answer?Multiple choiceEasy
  42. In Java, which comparison about Design Patterns and SOLID is accurate?Multiple choiceEasy
  43. What deeper point about Monotonic Stack should a senior Java developer mention?Multiple choiceHard
  44. Which practice avoids a common mistake with Topological Sort?Multiple choiceMedium
  45. Which practice avoids a common mistake with Sliding Window on Arrays?Multiple choiceMedium
  46. In Java, which comparison about Fast and Slow Pointers is accurate?Multiple choiceEasy
  47. In Java, which comparison about Singly Linked Lists is accurate?Multiple choiceEasy
  48. In Java, which comparison about Circular Queue and Ring Buffer is accurate?Multiple choiceEasy
  49. Which practice avoids a common mistake with Trie and Prefix Tree?Multiple choiceMedium
  50. Which statement about Breadth-First Search is the strongest interview answer?Multiple choiceEasy