Java Array Concatenate arraycat(String[][] array1, String[][] array2)

Here you can find the source of arraycat(String[][] array1, String[][] array2)

Description

Concatenates two String[][] arrays.

License

Apache License

Parameter

Parameter Description
array1 First array.
array2 Second array.

Declaration

public static String[][] arraycat(String[][] array1, String[][] array2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//www . java  2s  .c  o  m
       Concatenates two String[][] arrays.
           
       @param array1 First array.
       @param array2 Second array.
    */
    public static String[][] arraycat(String[][] array1, String[][] array2) {
        String[][] Result = new String[array1.length + array2.length][];

        int i = 0;

        for (int j = 0; j < array1.length; j++)
            Result[i++] = array1[j];

        for (int j = 0; j < array2.length; j++)
            Result[i++] = array2[j];

        return Result;
    }
}

Related

  1. arrayConcat(byte[] a, byte[] b)
  2. arrayConcat(final byte[] firstArray, final byte[] secondArray)
  3. arrayConcat(String[] first, String second)
  4. arrayConcat(T[] a, T[] b)