Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
15.5.2. Implementations
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the primary reason for using a Map in Java?
Hint
Think about how we access stored data.
- 2.
Can a HashMap contain null values?
Hint
Consider what kind of data structures allow nulls.
- 3.
Which of the following implementations of Map does not allow null keys?
- HashMap
- LinkedHashMap
- Hashtable
Hint
Think about which implementation is synchronized.
- 4.
True or False: TreeMap maintains the order of elements based on their natural ordering.
- True
- False
Hint
Reflect on how elements are stored in an ordered fashion.
- 5.
You are building a contact management application. Which Map implementation would you choose and why?
Hint
Think about how contacts are accessed.
- 6.
Data from a large data set must be stored in a sorted manner for quick retrieval. Which implementation should be chosen?
Hint
Consider how data will be organized and accessed.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting