Here you can find the source of mult(float[] nums, float n)
public static float[] mult(float[] nums, float n)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static float[] mult(float[] nums, float n) { assert !Float.isInfinite(n) : "Trying to multiply " + Arrays.toString(nums) + " by " + n; // Almost surely not what you want for (int i = 0; i < nums.length; i++) nums[i] *= n;//w w w . java2s . c o m return nums; } public static double[] mult(double[] nums, double n) { assert !Double.isInfinite(n) : "Trying to multiply " + Arrays.toString(nums) + " by " + n; // Almost surely not what you want for (int i = 0; i < nums.length; i++) nums[i] *= n; return nums; } public static String[] toString(long[] dom) { String[] result = new String[dom.length]; for (int i = 0; i < dom.length; i++) result[i] = String.valueOf(dom[i]); return result; } public static String[] toString(int[] dom) { String[] result = new String[dom.length]; for (int i = 0; i < dom.length; i++) result[i] = String.valueOf(dom[i]); return result; } }