MapIn the above example, we have created a `Map` of `String` keys and `Integer` values. We have added three entries to this map with keys `John`, `Sarah`, and `Emily`. In the first call to `getOrDefault`, we pass a key `"Mike"` which is not present in the map, so the default value of `0` is returned. In the second call to `getOrDefault`, we pass the key `"Emily"`, which is present in the map, so the value associated with it- `28` is returned. The `getOrDefault` method is a part of the Java Collection Framework and is present in the `java.util` package.map = new HashMap<>(); map.put("John", 25); map.put("Sarah", 30); map.put("Emily", 28); int age = map.getOrDefault("Mike", 0); System.out.println(age); // Output: 0 age = map.getOrDefault("Emily", 0); System.out.println(age); // Output: 28