Here you can find the source of multiply(double[] a, double[] b)
static double[] multiply(double[] a, double[] b)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { static double[] multiply(double[] a, double[] b) { final double[] res = Arrays.copyOf(a, a.length); for (int i = 0; i < res.length; ++i) { res[i] *= b[i];//from ww w .ja v a 2 s . c o m } return res; } }