Java tutorial
import java.util.HashMap; import java.util.Map; import java.util.Set; public class Main { public static void main(String[] args) { Map<String, String> map = new HashMap<>(); map.put("CSS", "style"); map.put("HTML", "mark up"); map.put("Oracle", "database"); map.put("XML", "data"); // Get the entry Set Set<Map.Entry<String, String>> entries = map.entrySet(); entries.forEach((Map.Entry<String, String> entry) -> { String key = entry.getKey(); String value = entry.getValue(); System.out.println("key=" + key + ", value=" + value); }); } }