3:37 pm - Sunday June 25, 2017

Get hashCode of a Hashtable int hashCode()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

BACK

                This function returns the hash code value for the map.

Example Program


import java.util.Hashtable;

public class HashtableHashCode

{

	public static void main(String args[])
	
	{

		Hashtable htable1 = new Hashtable();

		htable1.put(1, "Add");

		htable1.put(2, "Sub");

		htable1.put(3, "Mul");

		htable1.put(4, "Div");

		System.out.println("Hash code value is :" + htable1.hashCode());

	}

}


Output

Hash code value is :295614

 

BACK

Filed in: Java Examples

Comments are closed.