Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.LinkedHashMap;
import java.util.Map;

public class Main {
    public static <K, V> Map<K, V> join(Map<? extends K, ? extends V> first, Map<? extends K, ? extends V> second,
            Map<K, V> destination) {
        destination.putAll(first);
        destination.putAll(second);

        return destination;
    }

    public static <K, V> Map<K, V> join(Map<? extends K, ? extends V> first, Map<? extends K, ? extends V> second) {
        return join(first, second, new LinkedHashMap<>());

    }
}