public class StringHashMap { private HashMap map = new HashMap(); public void put ( String key, String value) { map.put( key, value); } public String get( String key ) { return (String)map.get(key); } }
public class GenericsSample { Map<String, String> strMap = new HashMap<String, String>(); String str = strMap.get(i); }