Skip to content

Commit c58dae5

Browse files
Add files via upload
1 parent ed44197 commit c58dae5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

HashSetDemo21.java

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

0 commit comments

Comments
 (0)