23J. Java Basics for Selenium - Collections Framework - HashMap

preview_player
Показать описание
In this video we will look at what a HashMap is in java and how to create it.
Maps – HashMap:
HashMap stores the data in Key Value pairs. It implements the Map Interface. To know a value of HashMap, one must know the key for it. It uses a technique called Hashing internally.
The following example shows:
1. How to declare a HashMap
2. Check if the HashMap is empty
3. Adding key value pairs to the map
4. Printing the map
5. Check if the map contains a key
6. Get a value using a key
7. Check to see if the map accepts duplicate key value pairs
8. Remove a key value pair using a key
9. Check if the map contains a value
10. Removing all key value pairs using clear()
Рекомендации по теме
welcome to shbcf.ru