I have the following global variable:
private Map<String,List<String>> network;
I create it in my constructor as follows:
network = new Hashtable<String,ArrayList<String>>();
The above description does not compile. Apparently, when I parameterize the map, should I declare that this mapping is specifically from String to ArrayList instead of using a more general list? Any insight into why I should do this?
source
share