Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Arrays;

public class Main {

    public static String[] contact(String[] strs1, String[] strs2) {
        if (strs1 == null || strs2 == null) {
            return null;
        }
        String[] result = Arrays.copyOf(strs1, strs1.length + strs2.length);
        System.arraycopy(strs2, 0, result, strs1.length, strs2.length);
        return result;
    }

    public static String[] contact(String[] strs1, String str) {
        return contact(strs1, new String[] { str });
    }
}