Skip to content

Commit c83cb18

Browse files
Add files via upload
1 parent 9cc302b commit c83cb18

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

HashSetDemo2.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import java.util.HashSet;
2+
3+
public class HashSetDemo2 {
4+
public static void main(String[] args) {
5+
HashSet<String> set = new HashSet<>();
6+
set.add("A");
7+
set.add("a");
8+
set.add("B");
9+
set.add("b");
10+
System.out.println(set);
11+
12+
set.clear();
13+
System.out.println(set);
14+
15+
}
16+
17+
}

0 commit comments

Comments
 (0)