2 ms·
Java is not adding local type inference as in C#. It only adds the diamond construct for inferring the generic types from the variable's type being assigned ...
by bad_user 17y ago
Java is not adding local type inference as in C#.
It only adds the diamond construct for inferring the generic types from the variable's type being assigned ...
Map<String, Integer> m = new HashMap<>();
Which is ugly, but many Java developers are taking "programming to an interface" rule quite literally.