Java IdentityHashMap values() methodThe values() method of the Java IdentityHashMap class is used to get a collection view of all the values present in the calling IdentityHashMap. SyntaxReturnA collection containing all the values present in the map Example 1Test it NowOutput: 6 {1=Java, 3=the, 6=language, 5=programming, 4=best, 2=is} [Java, the, language, programming, best, is] Example 2Test it NowOutput: 4 {1=Student@70dea4e, 3=Student@5c647e05, 2=Student@33909752, 4=Student@55f96302} [Student@70dea4e, Student@5c647e05, Student@33909752, Student@55f96302]
Next Topicjava IdentityHashMap
|