|
|
|
|
|
by sreque
5908 days ago
|
|
Funnily enough, your code won't compile. The generic signature of your hash map is incompatible with the signature of your variable declaration. You'll instead get a verbose error message like the following: Test.java:6: incompatible types
found : java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>>
required: java.util.Map<java.lang.String,java.util.List<java.lang.String>>
Map<String, List<String>> buf = new HashMap<String, ArrayList<String>>(); There really are productivity wins to using some of these newer languages, but you'll never learn that by just whining about their existence. |
|