Java Array Combine combineIntArrays(int[] A, int[] B)

Here you can find the source of combineIntArrays(int[] A, int[] B)

Description

combine Int Arrays

License

Open Source License

Declaration

public static int[] combineIntArrays(int[] A, int[] B) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int[] combineIntArrays(int[] A, int[] B) {
        int[] toReturn = new int[A.length + B.length];
        for (int i = 0; i < toReturn.length; i++) {
            if (i < A.length) {
                toReturn[i] = A[i];/*from  w ww .  j a  v  a 2  s  .  c  om*/
            } else {
                toReturn[i] = B[i - A.length];
            }
        }

        return toReturn;
    }
}

Related

  1. combineByteArray(byte[] one, byte[] two)
  2. combineChannels(int[][] a, int[][] r, int[][] g, int[][] b, int[][] pixels)
  3. combineChunksToByteArray(byte chunks[][])
  4. combineComponent(float[] partsComponent, float[] partsAlpha, int partsN)
  5. combineIndices(String[] in, String delimiter, int i, int j)
  6. combineLines(String[] lines)