Hi Folks,
I just stated coding on HashMap,but have encountered an error while trying to create one.
Here is the piece of code i was trying to compile.
Map<
String, Integer> myMap = new HashMap<String, Integer>();
I also tried
HashMap<String, Integer> myMap = new HashMap<String, Integer>();
Both of these are throwing errors saying "
The type HashMap is not generic;it cannot be parameterized with arguments <String,Integer>".
Can someone help here as i am unable to know why this kind of error it is throwing(I am using Eclipse).
I have JRE 7 installed in my system.
Thanks in advance