Skip to content

Commit

Permalink
HashSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankush1oo8 committed Mar 15, 2024
1 parent 73c271f commit c7cbccd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Hashing/hashSet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package Hashing;
import java.util.*;
public class hashSet {
public static void main(String[] args) {
HashSet<Integer>set=new HashSet<>();

set.add(1);
set.add(2);
set.add(3);
set.add(4);
set.add(5);
set.add(6);
System.out.println(set);
System.out.println(set.contains(2));
System.out.println(set.contains(5));
System.out.println(set.contains(69));
}
}

0 comments on commit c7cbccd

Please sign in to comment.