This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hash Maps  RSS feed

 
Torvald Helmer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get an error with this code.
Does anyone know what the problem
migth be?


It is a syntax error:
Syntax error, insert ";" to complete Statement

The error is right after the first "Integer"
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The syntax is
Map <String, Integer> priorities = new HashMap<String, Integer>();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!