import java.util.HashMap;
public class Hash_Map {
public static void main(String[] args) {
HashMap<String, String> countries = new HashMap<>();
countries.put("Turkey", "Ankara");
countries.put("USA", "Washington, D.C.");
countries.put("Russia", "Moscow");
countries.put("China", "Beijing");
countries.put("India", "New Dehli");
System.out.println(countries);
System.out.println();
countries.remove("India");
System.out.println(countries);
System.out.println();
System.out.println(countries.get("Russia"));
System.out.println();
System.out.println("Size: " + countries.size());
System.out.println();
countries.replace("USA", "Detroit");
System.out.println(countries);
System.out.println();
System.out.println(countries.containsKey("Pakistan"));
System.out.println();
System.out.println(countries.containsValue("Beijing"));
System.out.println();
for (String i : countries.keySet()) {
System.out.print(i + "=");
System.out.println(countries.get(i));
}
System.out.println();
countries.clear();
System.out.println(countries);
}
}