Why can I not create a HashMap with 'long' types in Java?

hashmap, java

Solution

you're using primitives rewrite to `HashMap<Long,Long> x = new HashMap<>()`

Problem

Any reason that the following is not allowed? ``` HashMap<long, long> x = new HashMap<>(); ```

Original source