I have declared following HashMap
Map<Integer,String> map = new HashMap<>(); // Java 6+
I have two questions :
A) Is there any Issue(Performance or Other) , while I put element in HashMap with primitive data type for above declare HashMap
for example
map.put(1,"abc");
Or I have to use only
map.put(new Integer(1),"abc");
B) Which is good candidate for HashMap if I have number(int) as a Key
String OR Integer