Map and collection exist in parallel. To hold data that has a mapping relationship: Key-value
Both the key and value in the MAP can be data of any reference type
The key in the map is stored with set, which does not allow repetition, that is, the class corresponding to the same map object, the Hashcode () and the Equals () method must be overridden.
The common string class acts as a "key" to the map.
There is a one-way relationship between key and value, that is, a unique, deterministic value can always be found through the specified key
Map Common methods :
Add, delete operations:
Object put (object Key,object value)
Object remove (Object key)
void Putall (Map t)
void Clear ()
Ways to manipulate Meta view:
Set KeySet ()
Collection VALUES ()
Set EntrySet ()
Element query operation:
Object get (Object key)
Boolean ContainsKey (Object key)
Boolean Containsvalue (Object value)
int size ()
Boolean IsEmpty ()
Boolean equals (Object obj)
Java Learning Diary ————— Map interface