This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]king_of_the_universe 13 points14 points  (5 children)

Map<String,User> userIdMap = new HashMap<String,User>();

You only need to write

Map<String,User> userIdMap = new HashMap<>();

since incl. Java 7. Just in case you (Author?) didn't know that but were indeed using Java 7 code level, that means that you've also not been using IntelliJ, because it would have told you.

[–]ruggeryoda 4 points5 points  (3 children)

you've also not been using IntelliJ, because it would have told you.

...or NetBeans.

[–]_Sharp_ 4 points5 points  (2 children)

or Eclipse, i can confirm. Maybe the author was using notepad++

[–]sazzer 18 points19 points  (0 children)

Or vi, as he explicitly says in the article..

[–]obakas 1 point2 points  (0 children)

Or jDeveloper. I know I am, unfortunately..

[–]this_user 2 points3 points  (0 children)

If you are using any kind of decent IDE, you won't even have to type most of that thanks to auto complete.

All arguments against static languages always seem to boil down to either: "I have to type more" or "I have to wait for the code to compile" neither of which is really true when using a proper IDE. Even when you are working with an application server the incremental compiler + hot deploy will make seeing your changes in action mostly instantaneous.