I have two values in my hashmap… How can i access those values without using for loops..
This is my hashmap code:
HashMap<Integer, Integer> obMap = new HashMap<Integer, Integer>();
obMap.put(new Integer(1),PartnerID);
obMap.put(new Integer(2),numwidgets);
return obMap;
I am returning values to java script method…how to read values in JSP if i get in obMap.
Note you don’t need
new Integer(1). It’s autoboxing.