//Skip to content
- import java.util.HashMap;
- import java.util.HashSet;
- import java.util.Map;
- import java.util.Set;
-
- public class HashMapDemo {
-
- public static void main(String[] args) {
-
- HashMap<String, Integer>hMap=new HashMap<>();
- hMap.put("Sujan", 1);
- hMap.put("Shakil", 2);
- hMap.put("Shimul", 3);
-
- Set<String>name=new HashSet<>();
- name=hMap.keySet();
- print(name);
-
-
-
- }
- private static void print(Set<String>name) {
- for(String x:name){
- System.out.println(x);
- }
- }
-
- }
I am Md Abdullah Al Hasan. I have completed my graduation in Computer Science and Engineering from Jashore University of Science and Technology.
0 Comments:
Post a Comment