Here you can find the source of merge(Map
@SafeVarargs public static <K, V> Map<K, V> merge(Map<K, V> map, Map<K, V>... maps)
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { @SafeVarargs public static <K, V> Map<K, V> merge(Map<K, V> map, Map<K, V>... maps) { if (maps != null && maps.length > 0) { for (Map<K, V> m : maps) map.putAll(m);/*w w w.ja v a2s.c om*/ } return map; } }