Skip to content

Commit 18fb46c

Browse files
added Keyset
1 parent c87749c commit 18fb46c

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
*
3+
*/
4+
package HashMap;
5+
import java.util.*;
6+
/**
7+
* @author M.NAVEEN
8+
RANDOM CODER'S
9+
*
10+
*/
11+
public class KeySet_HashMap
12+
{ static HashMap <Integer,String> map;
13+
public KeySet_HashMap(HashMap <Integer,String> map)
14+
{
15+
this.map=new HashMap(map);
16+
}
17+
18+
public static void main(String[] args)
19+
{
20+
new KeySet_HashMap(new HashMaps().map) ;
21+
System.out.println("HASHMAP :"+map);
22+
Set s=map.keySet();
23+
System.out.println("Key in hashMap-->map :"+s);
24+
}
25+
26+
}

0 commit comments

Comments
 (0)