Java - Data Structures Flashcards

1
Q

What is the difference between ArrayList and LinkedList in Java?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does HashMap work internally in Java?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a bucket in a HashMap?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the differences between HashMap, TreeMap, and LinkedHashMap?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the fail-fast behavior of Java collections. How does ConcurrentModificationException happen?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does Set ensure uniqueness? Explain how HashSet and TreeSet work.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between Comparable and Comparator in sorting collections?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the thread-safe alternatives to standard collections in Java?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the internal architecture of ConcurrentHashMap in Java 8 and how it improved over Java 7.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly