Java examples for Collection Framework:HashMap
Save and get HashMap
import java.util.HashMap; public class Main { public static void main(String[] args) { HashMap hMap = new HashMap(); // www .jav a 2 s . c o m hMap.put("One", new Integer(1)); hMap.put("Two", new Integer(2)); Object obj = hMap.get("One"); System.out.println(obj); } }