Java tutorial
//package com.java2s; import java.util.Arrays; public class Main { /** * Fill the given array with the given value * @param <T> Type of array elements * @param array array to fill * @param value value to use * @return filled array */ public static <T> T[] fill(final T[] array, final T value) { Arrays.fill(array, value); return array; } }