Java examples for Collection Framework:Hashtable
Save and get value to Hashtable
import java.util.Hashtable; public class Main { public static void main(String[] args) { Hashtable ht = new Hashtable(); // w w w. j a va 2s . c om ht.put("One", new Integer(1)); ht.put("Two", new Integer(2)); Object obj = ht.get("One"); System.out.println(obj); } }