package com.zetcode; import java.util.Map; public class HashMapEnhancedForEx { public static void main(String[] args) { Map users = Map.of( "Jane Smith", "janesmith@example.com", "John Doe", "jdoe@example.com", "Peter Black", "peterblack@example.com" ); for (Map.Entry entry : users.entrySet()) { System.out.printf("%s %s%n", entry.getKey(), entry.getValue()); } } }