Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

HashMap declaration

what is difference between below threee HashMap declarations

1.HashMap<String,Integer> map=new HashMap<String,Integer>();
2.Map<String,Integer> map=new HashMap<String,Integer>();
3.HashMap<String,int> map=new HashMap<String,int>();

why i cannot pass primitive to generics?
please advise
ASKER CERTIFIED SOLUTION
Avatar of krakatoa
krakatoa
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No OP input. No other expert comment. My answer in any case is correct.