Here you can find the source of sumArrays(double[] xs1, double[] xs2)
public static double[] sumArrays(double[] xs1, double[] xs2)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] sumArrays(double[] xs1, double[] xs2) { double[] sum = new double[xs1.length]; for (int i = 0; i < xs1.length; i++) { sum[i] = xs1[i] + xs2[i];//w w w .j ava 2s . c o m } return sum; } }