Javatpoint Logo
Javatpoint Logo

Java IdentityHashMap get() method

The get(Object key) method of the Java IdentityHashMap is used to get the value which is linked with the specified key, in the calling IdentityHashMap or null, if the key is not linked with any value.

Syntax

Parameters

key - The key whose linked value is to be found.

Return

The value which is linked with the specified key or null, if the key is not connected with any value.

Example 1

Test it Now

Output:

1
4
null

Example 2

Test it Now

Output:

Java
best
null

Example 3

Test it Now

Output:




Help Others, Please Share

facebook twitter pinterest