import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String name = scanner.next(); Map<Integer, String> map = new HashMap<Integer, String>(); map.put(1, "Amy"); map.put(2, "Joe"); map.put(3, "Tom"); map.put(4, "Susan"); //write your code here...... Set<Map.Entry<Integer,String>> entrySet=map.entrySet(); for(Map.Entry<Integer,String> meis:entrySet) { int key=meis.getKey(); String value=meis.getValue(); System.out.println(key+":"+value); } System.out.println(); map.put(5,name); map.remove(4); map.replace(3,"Tommy"); for(Map.Entry<Integer,String> meis:entrySet) { int key=meis.getKey(); String value=meis.getValue(); System.out.println(key+":"+value); } } }