关于存储对象的问题
有这样的数据
id name
[解决办法]
什么问题?
[解决办法]
private static HashMap<Integer,A> map=new HashMap<Integer,A>(); pubilc static void putToMap(int id,String name){ A temp=null; if(map.get(id)!==null){ temp=map.get(id); temp.name.add(name); }else{ temp=new A(id,name); } map.put(id,temp); }