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 2a071a7 commit bed0f23Copy full SHA for bed0f23
Collections/HashSetTest.java
@@ -0,0 +1,28 @@
1
+//version 11.1
2
+
3
+import java.util.*;
4
5
+class HashSetTest
6
+{
7
+ public static void main(String s[])
8
+ {
9
+ LinkedHashSet al=new LinkedHashSet();
10
11
+ al.add(new String("ABC"));
12
+ al.add("xyz");
13
+ al.add("mno");
14
+ al.add("pqr");
15
16
+ al.add("hij");
17
18
+ System.out.println("No. of elements: "+al.size());
19
+ System.out.println("List of elements: ");
20
+ Iterator itr=al.iterator();
21
+ while(itr.hasNext())
22
23
+ Object ob=itr.next();
24
+ System.out.println(ob);
25
+ }
26
27
+}
28
0 commit comments