2015-01-26 110 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