I'm trying to learn Java, and I reached the HashSet part, Long story short I'm testing the contain method.
public static void main(String[] args) {
HashSet<Integer> firstSet = new HashSet<>();
firstSet.add(3);
HashSet<Integer> secondSet = new HashSet<>();
secondSet.add(3);
boolean var = firstSet.contains(secondSet);
System.out.println(var);
}
I believe this piece of code should return true, while it is returning false. Any help!