Code example for HashSet

Methods: addAll

0
		} 
		return sub_a;
	}	 
	 
	public ArrayList<String> removeDuplicates(ArrayList<String> a){
		HashSet<String> hs = new HashSet<String>();
		hs.addAll(a);
		a.clear();
		a.addAll(hs);
		return a;
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java