Javatpoint Logo
Javatpoint Logo

Java IdentityHashMap putAll() method

The putAll(Map<? extends K, ? extends V> m) method of the Java IdentityHashMap class is used to copy all the key-value pairs from the specified Map to the calling IdentityHashMap.

Syntax

Return

m - Map from which key-value pairs are to be copied

Example 1

Test it Now

Output:

{Java=1, the=3, language=6, programming=5, best=4, is=2}
{}
{Java=1, the=3, language=6, programming=5, best=4, is=2}

Example 2

Test it Now

Output:




Help Others, Please Share

facebook twitter pinterest