Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- import java.util.HashMap;
- public class HashMapExample{
- public static void main(String[] args) {
- HashMap myMap = new HashMap();
- map.put("1", "A");
- map.put("2", "B");
- map.put("3", "C");
- String one = (String) map.get("1");
- System.out.println(one);
- }
- }
<< HashMap Operations

Post new comment