Java examples for Collection Framework:Array Fill
fill Double Array
public class Main{ public static void fillDoubleArray(final double[] array, final ArrayFillFunction<Double> func) { for (int i = 0; i < array.length; ++i) { array[i] = func.getElementForIndex(i); }/*from ww w . j a v a2 s. c o m*/ } }