We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 194449c commit 982b296Copy full SHA for 982b296
AbstractCollectionDemo1.java
@@ -0,0 +1,22 @@
1
+package TreeSet;
2
+
3
+import java.util.AbstractCollection;
4
5
+import java.util.HashSet;
6
+import java.util.TreeSet;
7
+import java.util.concurrent.CopyOnWriteArraySet;
8
9
+public class AbstractCollectionDemo1 {
10
+ AbstractCollection<Integer> demoCollection = new HashSet<>();
11
+ AbstractCollection<Integer> demoCollection1 = new TreeSet<>();
12
+ AbstractCollection<Integer> demoCollection2 = new CopyOnWriteArraySet<>();
13
14
+ public static void main(String[] args) {
15
+ AbstractCollectionDemo1 a = new AbstractCollectionDemo1();
16
+ a.demoCollection.add(1);
17
+ a.demoCollection.add(2);
18
+ a.demoCollection.add(3);
19
+ a.demoCollection.add(4);
20
+ System.out.println(a.demoCollection);
21
+ }
22
+}
0 commit comments