Java 8 Map API Enhancements
Java 8 enriches the Map interface with default methods such as getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent and replace, allowing developers to retrieve values with fallbacks, iterate entries, combine or conditionally update entries, and thus write more concise, readable code with far less boilerplate.