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).
I've seen code posted by the instructor using HashMap like this...
public HashMap<Positio n, 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<Positio n, 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
worked with other languages for years though).
I've seen code posted by the instructor using HashMap like this...
public HashMap<Positio n, 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<Positio n, 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
Comment