3 ms·
Keeps getting better though, the example in the post: Map<String,User> userIdMap = new HashMap<String,User>(); is now just: Map<String,User> userIdMap = new
by reitanqild 11y ago
Keeps getting better though, the example in the post:
Map<String,User> userIdMap = new HashMap<String,User>();
is now just:
Map<String,User> userIdMap = new HashMap<>();
and Java Generics already saves a ton of type casting as well as checks and corrections IMO.
- scalesolved 11y agoOr use Lombok and get it even more concise! val userIdMap = new HashMap<String,User>();