Re: Quick HashMap Question
- From: IchBin <weconsul@xxxxxxx>
- Date: Mon, 02 Jan 2006 17:00:28 -0500
xor wrote:
I'm doing up a school project using java, and am a little new to it (I've worked with other languages for years though).You have to be running JDK\JRE 1.5. This format is new in 1.5. You must be running an earlier version say 1.4
I've seen code posted by the instructor using HashMap like this...
public HashMap<Position, Integer> boardNumbers;
... and ...
HashMap<Integer, Integer> allNumbers = new HashMap<Integer, Integer>();
... when I go to compile this (on my windows box) it craps out and complains...
Board.java:22: <identifier> expected public HashMap<Position, Integer> boardNumbers;
... and ...
Board.java:55: not a statement
HashMap<Integer, Integer> allNumbers = new HashMap<Integer, Integer>();
... both have carrots pointing at the opening <
is this a version issue or something? The school uses a unix environment, but I thought that shouldn't matter.
Any help would be appreciated.
thanks, dave
Uninstall your current Java version from the Add\remove program in the control panel.
Then download and install latest version jdk1.5.0_06 from http://www.java.com/en/download/index.jsp
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-) .
- References:
- Quick HashMap Question
- From: xor
- Quick HashMap Question
- Prev by Date: Quick HashMap Question
- Next by Date: Applet interaction with javascript
- Previous by thread: Quick HashMap Question
- Next by thread: Applet interaction with javascript
- Index(es):
Relevant Pages
|
|