import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
Map<String,Integer> m=new HashMap<>();
m.put("a",1);
m.put("b",2);
m.put("c",3);
for(Map.Entry<String,Integer> entry:m.entrySet())
{
System.out.println(entry.getKey()+" "+entry.getValue());
}
m.forEach((key,value)-> m.put(key,value+1));
for(Map.Entry<String,Integer> entry:m.entrySet())
{
System.out.println(entry.getKey()+" "+entry.getValue());
}
System.out.println(m.contains("a"));
System.out.println(m.contains("d"));
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: