实验三写完力(喜)

This commit is contained in:
2024-06-11 00:50:52 +08:00
parent 1a645df671
commit b7333f4a26
+2
View File
@@ -12,6 +12,8 @@ public class HelloSet {
} }
// ---------------------Begin------------------------ // ---------------------Begin------------------------
hashSet.add("helloHashSet"); hashSet.add("helloHashSet");
hashSet.remove("cat");
hashSet.add("fish");
hashSet.remove("apple"); hashSet.remove("apple");
// ---------------------End------------------------ // ---------------------End------------------------
hashSet.forEach(ele -> System.out.println(ele)); hashSet.forEach(ele -> System.out.println(ele));