Java Vector hashCode() MethodThe hashCode() method of Java Vector class is used to get the hashcode value for the vector which is in use. Syntax:Following is the declaration of hashCode() method: Parameter:This method does not accept any parameter. Returns:The hashCode() method returns the hash code value for this vector. It returns the hashcode in integer form. Exceptions:NA Compatibility Version:Java 1.2 and above Example 1:Test it NowOutput: Element in vector = [1, -2, 3, -4, 5] HashCode vector = 29495854 Example 2:Test it NowOutput: Color elements in vector: [White, Green, Black, Pink] HashCode: 1877005970 Example 3:Test it NowOutput: 95 2982 92503 Next TopicJava Vector |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India