实现了实验三的添加和移除
This commit is contained in:
@@ -11,6 +11,8 @@ public class HelloSet {
|
|||||||
hashSet.add(scanner.next());
|
hashSet.add(scanner.next());
|
||||||
}
|
}
|
||||||
// ---------------------Begin------------------------
|
// ---------------------Begin------------------------
|
||||||
|
hashSet.add("helloHashSet");
|
||||||
|
hashSet.remove("apple");
|
||||||
// ---------------------End------------------------
|
// ---------------------End------------------------
|
||||||
hashSet.forEach(ele -> System.out.println(ele));
|
hashSet.forEach(ele -> System.out.println(ele));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user