将数组乘以常量
//package com.nowjava;// 来 自 n o w j a v a . c o m - 时代Java public class Main { public static double[] multiplyArrayByConst(double[] array, double constant) { double[] arr_copy = array.clone(); for (int i = 0; i < array.length; i++) { arr_copy[i] = (double) arr_copy[i] * constant; } return arr_copy; } }