Java Array Sum sum(Object[] srcOne, Object[] srcTwo)

Here you can find the source of sum(Object[] srcOne, Object[] srcTwo)

Description

sum

License

Open Source License

Declaration

public static Object[] sum(Object[] srcOne, Object[] srcTwo) 

Method Source Code

//package com.java2s;
/**************************************************************************************
 * Copyright (C) 2008 EsperTech, Inc. All rights reserved.                            *
 * http://esper.codehaus.org                                                          *
 * http://www.espertech.com                                                           *
 * ---------------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the GPL license       *
 * a copy of which has been included with this distribution in the license.txt file.  *
 **************************************************************************************/

public class Main {
    public static Object[] sum(Object[] srcOne, Object[] srcTwo) {
        Object[] result = new Object[srcOne.length + srcTwo.length];
        System.arraycopy(srcOne, 0, result, 0, srcOne.length);
        System.arraycopy(srcTwo, 0, result, srcOne.length, srcTwo.length);
        return result;
    }//ww  w . ja v a  2  s  . c o m
}

Related

  1. sum(long[] array)
  2. sum(long[] counts)
  3. sum(Number... numbers)
  4. sum(Number[] array)
  5. sum(Number[] numbers)
  6. sum(short tab[], int a, int b)
  7. sum(short[] ary)
  8. sum(String[] tokens, int start, int length, String separator)
  9. sum3(double[] a, double[] b)