Is this declaration
// version 1
EnumMap<Type, EnumSet<Part>> types = new EnumMap<>(Type.class);
the same as this:
// version 2
var types = new EnumMap<Type, EnumSet<Part>>(Type.class);
I think it's the same, because I can also write this:
EnumMap<Type, EnumSet<Part>> types = new EnumMap<Type, EnumSet<Part>(Type.class);
and therefore this:
// version 2
var types = new EnumMap<Type, EnumSet<Part>>(Type.class);
Are there any differences in version 1 and version 2? Which should I prefer?