2015-01-26 107 views

回答

2

在这里,你应该如何申报您的地图:

Map<Integer, HashSet<Integer>> hm = new HashMap<>(); // In Java SE 7, you can substitute the parameterized type of the constructor with an empty set of type parameters (<>) 
Map<Integer, HashSet<Integer>> hm = new HashMap<Integer, HashSet<Integer>>(); // version of jdk prior to 7