- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSample5.java
More file actions
Latest commit
25 lines (19 loc) · 540 Bytes
/
Copy pathSample5.java
File metadata and controls
25 lines (19 loc) · 540 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
importjava.util.HashSet;
importjava.util.Iterator;
publicclassSample5 {
publicstaticvoidmain(String[] args)
{
HashSeths=newHashSet(); //dont follow order no concept of index as well as hashset wont follow duplicate elements
hs.add(100);
hs.add("true");
hs.add(true);
hs.add(100);
hs.add(1);
Iteratoritr=hs.iterator();
while(itr.hasNext())
{
Objecto= itr.next();
System.out.println(o);
}
}
}