2:21 am - Friday April 19, 2019

HashMap Example program for 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
/**
*@author:candidjava.com
*@description:hashcode in hash table
*/

import java.util.Hashtable;

public class HashCode {

	public static void main(String[] args){

	Hashtable h=new Hashtable();
	h.put(2,"3");
	h.put(3,"4");
	h.put(6, "3");
	System.out.println("The hash values are "+h.values());
}
}

OUTPUT:
The hash values are [3, 4, 3]

Filed in: Z-A All Java Codes

Comments are closed.