[Solved] How to make ArrayList of hashset in java? [closed]
[ad_1] Just make an ArrayList of HashSets : ArrayList<HashSet<Integer>> list = new ArrayList<HashSet<Integer>>(); Then create HashSets, fill them, and put them in your ArrayList normally. HashSet<Integer> set = new HashSet<Integer>(); set.add(1); set.add(whateverIntValue); list.add(set); You can then get the nth HashSet of your list using list.get(n). [ad_2] solved How to make ArrayList of hashset in java? … Read more