But it's not uncommon (in my opinion) to write stuff like
EnumMap<FooEnum, BarClass> map = new EnumMap<FooEnum, BarClass>(FooEnum.class);
var map = new EnumMap<FooEnum, BarClass>();
When I wrote something very similiar to that last week, I failed to figure out how to avoid repeating the type signature, and was annoyed.
EnumMap<FooEnum, BarClass> map = new EnumMap<>(FooEnum.class);
With that said, I do think java has too much pro-long-method-and-variable-name culture.
[1] http://www.javaworld.com/article/2074080/core-java/jdk-7--th...
Map<SomeComplexTypes> map = new HashMap<>();
But it's not uncommon (in my opinion) to write stuff like
which to me ought to read something like Of course, I don't do a lot of Java programming these days and perhaps my first example is simply broken due to ignorance.When I wrote something very similiar to that last week, I failed to figure out how to avoid repeating the type signature, and was annoyed.