Map interface in java - Theory - Explained in Detail

Veröffentlicht am: 19 Juli 2024
auf dem Kanal: Learn Java
258
11

You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.

Map interface in Java:-
=========================
1. Map is an interface which is available java.util package.
2. Map concept is used to represent the data in the form of key-value pair.
3. It was in the JDK1.2 version.
4. Please be informed that the keys must be unique and the values can be duplicated.
5. Map is going to all the unique keys , but the values can be duplicated.
6. By default, the Map does not follow the insertion order.
7. By default, the Map does not follow the sorting order.
8. By default, Heterogeneous elements are allowed at both keys and values.
9. Keys are able to allow only one null value , but the values, they allow any number of null values.

Methods in Maps:-
===============
1. public Object put(Object key , Object value)
2. public void putAll(Map map);
3. public Object remove(Object key);
4. public Object get(Object key);
5. public int size();
6. public boolean isEmpty();
7. public void clear();
8. public boolean containsKey(Object key)
9. public boolean containsValue(Object value)
10. public Set keySet();
11.public Collection values()


Auf dieser Seite können Sie das Online-Video Map interface in java - Theory - Explained in Detail mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learn Java 19 Juli 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 258 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!