I don't understand why the contains is not working (in fact if I had passed in custom class I could have revisited my hascode and equals method but this is Integer). So instead of contains what can I use? Please help.
Set<Integer> st = new HashSet<>();
st.add(12);
Set<Integer> st1 = new HashSet<>();
st1.add(12);
System.out.println(st.contains(st1));