- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample10.java
More file actions
Latest commit
28 lines (24 loc) · 689 Bytes
/
Copy pathsample10.java
File metadata and controls
28 lines (24 loc) · 689 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
26
27
28
importjava.util.HashMap;
importjava.util.Iterator;
importjava.util.Set;
publicclasssample10 {
publicstaticvoidmain(String[] args)
{
HashMaphm=newHashMap<>(); // follows key indexing wont follow duplicates
hm.put(109, "Acon");
hm.put(102,"Bcon");
hm.put(103,"Ccon");
hm.put(104,"Dcon");
hm.put(105,"Econ");
hm.put(106,"Fcon");
hm.put(1,"Zcon");
hm.put(1,"Fcon");
Sets= hm.keySet();
Iteratoritr= s.iterator();
while(itr.hasNext())
{
Objecto=itr.next();
System.out.println(o + " ===" + hm.get(o));
}
}
}