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

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World