wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Hash Maps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hash Maps" Watch "Hash Maps" New topic
Author

Hash Maps

Torvald Helmer
Greenhorn

Joined: Oct 26, 2005
Posts: 8
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

Joined: Aug 05, 2005
Posts: 3504
    
  14
The syntax is
Map <String, Integer> priorities = new HashMap<String, Integer>();


Joanne
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hash Maps