3:41 pm - Sunday June 25, 2017

Hashtable Example program for values()

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:hash table for values
*/
import java.util.Hashtable;
public class Hashtable {
public static void main(String[] args){
               Hashtable h=new Hashtable();
	h.put(2,"3");					//to add first value
	h.put(3,"4");					//to add second value
	h.put(6,"3");					//to add third value
	System.out.println("Displays stored values are "+h.values());	//shows the stored values
}
}

Output:

Displays stored values are [3, 4, 3]

BACK



Filed in: Z-A All Java Codes

Comments are closed.