CompositeName hashCode() method in Java with Examples
The hashCode() method of a javax.naming.CompositeName class is used to return the hash code of this composite name. The hash code of this composite name object is the sum of the hash codes of the “canonicalized” forms of individual components of this composite name.
public int hashCode()
Parameters: This method accepts nothing.
Return value: This method returns an int representing the hash code of this name.
Below programs illustrate the CompositeName.hashCode() method:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.