I already tried this post: Java, Simplified check if int array contains int
and tried this
int[] temp = {3,9,15,21,27,33,39};
HashSet<Integer> otherBy3 = new HashSet<Integer>(Arrays.asList(temp));
based on the post i saw on the above link instructing me to do this:
HashSet<Integer> set= new HashSet<Integer>(Arrays.asList(intArray));
set.contains(intValue)
but I keep getting this error
cannot find symbol
symbol : constructor HashSet(java.util.List<int[]>)
location: class java.util.HashSet<java.lang.Integer> HashSet<Integer> otherBy3 = new HashSet<Integer>(Arrays.asList(temp));
Any help would be appreciated