Here you can find the source of div(float[] nums, int n)
public static float[] div(float[] nums, int n)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static float[] div(float[] nums, int n) { for (int i = 0; i < nums.length; i++) nums[i] /= n;//from w w w.jav a2s . c o m return nums; } public static float[] div(float[] nums, float n) { assert !Float.isInfinite(n) : "Trying to divide " + 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 double[] div(double[] nums, double n) { assert !Double.isInfinite(n) : "Trying to divide " + 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; } }