Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Map;

import java.util.TreeMap;

public class Main {

    private static Map<Integer, Integer> mergeByTreeMap(int[] a, int[] b) {
        Map<Integer, Integer> map = new TreeMap<Integer, Integer>();
        for (int i = 0; i < a.length; i++) {
            map.put(a[i], a[i]);
        }
        for (int i = 0; i < b.length; i++) {
            map.put(b[i], b[i]);
        }
        return map;
    }
}