Java examples for Collection Framework:Set
Set all elements of a to the value v; return a.
//package com.java2s; public class Main { /**//from w w w .j a v a 2s.c o m * Set all elements of a to the value v; return a. */ public static <T> T[] fill(final T[] array, final T value) { for (int i = 0; i < array.length; i++) { array[i] = value; } return array; } }