import java.util.*; public class MapEqualityDemo { public static void main(String[] args) { MapThis code creates two HashMaps, `map1` and `map2`, with some key-value pairs. The `equals()` method is then used to compare the two maps, and the result is printed to the console. The `equals()` method is part of the `java.util` package in Java.map1 = new HashMap<>(); map1.put("key1", "value1"); map1.put("key2", "value2"); Map map2 = new HashMap<>(); map2.put("key1", "value1"); map2.put("key2", "value2"); map2.put("key3", "value3"); boolean isEqual = map1.equals(map2); System.out.println("Are the maps equal? " + isEqual); } }