Java tutorial
//package com.java2s; import java.util.*; public class Main { public static <K, V> Map<K, V> mergedMap(Map<K, ? extends V> base, Map<K, ? extends V> overrides) { Map<K, V> map = new HashMap<>(); map.putAll(base); map.putAll(overrides); return map; } }