Java - Data Structures Flashcards
1
Q
What is the difference between ArrayList and LinkedList in Java?
A
2
Q
How does HashMap work internally in Java?
A
3
Q
What is a bucket in a HashMap?
A
4
Q
What are the differences between HashMap, TreeMap, and LinkedHashMap?
A
5
Q
Explain the fail-fast behavior of Java collections. How does ConcurrentModificationException happen?
A
6
Q
How does Set ensure uniqueness? Explain how HashSet and TreeSet work.
A
7
Q
What is the difference between Comparable and Comparator in sorting collections?
A
8
Q
What are the thread-safe alternatives to standard collections in Java?
A
9
Q
Explain the internal architecture of ConcurrentHashMap in Java 8 and how it improved over Java 7.
A