dictionary - HashMap in Java Not Working -


this second day coding in java, no worries though not new coding. anyhow, not use not having dictionaries python has, can store key , value.

that when came upon java hashmaps. currently, can not seem them work, , unsure why. here code using, these seems raising errors:

 map<string, string> visual = new hashmap<string, string>(); 

then here error generating:

multiple markers @ line     - type map not generic; cannot parameterized arguments <string, string>     - hashmap cannot resolved type 

i importing hash libraries:

import java.util.map; import java.util.hashmap; 

so question is, why hashmap not working? thank you! :)


p.s. here little piece of code:

public map areatotal() {     map<string, string> visual = new hashmap<string, string>();     return visual; } 

edit

sorry, guess did forget include other information.

  • using eclipse
  • only other import math

you have map class in same package not generic - should removed or renamed else


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -