Java IdentityHashMap isEmpty() method

The isEmpty() method of the Java IdentityHashMap is used to check whether the calling IdentityHashMap is empty or not.

Syntax

Return

True, if the calling IdentityHashMap is empty.

Example 1

Output:

false
true

Example 2

Output:

false
true