Map<Long, String> map = new HashMap<Long, String>();
map.put(1L, "v1");
map.put(2L, "v2");
map.put(3L, "v3");
System.out.println("map.get(1)=" + map.get(1));
System.out.println("map.get(1L)=" + map.get(1L));
输出结果
map.get(1)=null
map.get(1L)=v1
产生输出的原因有几因素:
public abstract V
get(Object paramObject);
原文地址:http://blog.csdn.net/happy_cheng/article/details/41450619