type Map does not take parameters ?



Hi all,

I got a strange error message from the java 1.5.0 compiler:
"type Map does not take parameters" which Map certainly does.

The complete code was this mini class:
import java.util.*;
class AAA {
public static void main(String[] args) {
Map<Integer, String> map = new HashMap<Integer,String>();
System.out.println(map);
}
}

NB, it does not compile with the original compiler, but compiles happily within an Eclipse 3.1 environment.
And it does also compile with the original compiler when I change the reference type from Map to HashMap.

How can this be?

Yours,
Bu.
.



Relevant Pages

  • Re: Compilation Error ( Mapping Project )
    ... What else do you have in the Biztalk project apart from the map. ... There are potential problems with memory when you used scripting functoids ... Internal Compiler Error: ...
    (microsoft.public.biztalk.general)
  • Re: type Map does not take parameters ?
    ... "type Map does not take parameters" which Map certainly does. ... NB, it does not compile with the original compiler, but compiles happily ...
    (comp.lang.java.programmer)
  • Re: Frage zu Generics
    ... in die du jeden Key reinstecken ... Die andere Fraktion erwartet aber, dass eine parametrisierte Map, die ... bzw. dass der Compiler im Falle einer Verletzung meckert. ... Fahrrad implements Dimensioned ...
    (de.comp.lang.java)
  • Re: using map, list etc. in const methods
    ... >>Is there a proper way to leave the function const? ... return a const version of the map, so that the caller may not change the ... but failed because of a lot of compiler ...
    (comp.lang.cpp)
  • Re: how does your language... make a map?
    ... compiled to bytecode using a compiler for testing and deployment. ... Let's say we want a map 60 characters down by 80 characters across. ... I want to create an array that will in the future contain all the ...
    (rec.games.roguelike.development)