// HashMap kludge. This will compile. HashMap<Long,String> hashMaps = new HashMap[ 1000 ]; // you may not write HashMap<Long,String> hashMaps = new HashMap<>[ 1000 ]; // or HashMap<Long,String> hashMaps = new HashMap<Long,String>[ 1000 ];