- Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathHashing.java
More file actions
Latest commit
19 lines (18 loc) · 393 Bytes
/
Copy pathHashing.java
File metadata and controls
19 lines (18 loc) · 393 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//implementation of get() in hashmap
importjava.util.*;
classMapGet2
{
publicstaticvoidmain(String...a)
{
Map<Integer,String>m=newHashMap<Integer,String>();
m.put(10,"Lovely");
m.put(20,"Professional");
m.put(30,"Universitry");
m.put(40,"Welcomes");
m.put(45,"YOU");
//m.clear();
m.remove(45);
System.out.println(m);
System.out.println("Value of 20 is"+m.get(20));
}
}