Check out example codes for "hashset contains java". It will help you in understanding the concepts better.

Code Example 1

HashSet<Integer> set = new HashSet<Integer>();      
set.contains(110)//public boolean contains(Object o)

Learn ReactJs, React Native from akashmittal.com