Hashmap in Java
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class HashhMap {
public static void main(String[] args){
Map<String, String> map = new HashMap<>();
map.put("myName","Kumaran");
map.put("myProgram", "Java");
map.put("Designation", "Java Developer");
Set<String> key = map.keySet();
for(String keys: key){
System.out.println(keys+ " : " +map.get(keys));
}
}
}
Kumaran KM