Java examples for Collection Framework:Array Algorithm
multiply Array By Const
//package com.java2s; 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; }/*from w w w .ja v a 2 s . c o m*/ return arr_copy; } }