I am using multimap as shown below but as shown but the issue with this that first i am adding the contents in listand then associating it with the key, can I do it in a single line itself.
Map<Integer, List<String>> multimap = new HashMap<Integer, List<String>>();
List<String> someList = new ArrayList<String>();
someList.add("abc");
someList.add("def");
someList.add("ght");
multimap.put(1, someList);
that is adding list contents where I am eneterting the key. something like
multimap.put(1, // adding the list in a single line here itslef );
Mapwith aListas a value.