Java Array Fill filledIntArray(int length, int cont)

Here you can find the source of filledIntArray(int length, int cont)

Description

filled Int Array

License

Apache License

Declaration

public static int[] filledIntArray(int length, int cont) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Arrays;

public class Main {
    public static int[] filledIntArray(int length, int cont) {
        int[] res = new int[length];
        Arrays.fill(res, cont);//from   w w w . j  av  a2  s. co m
        return res;
    }
}

Related

  1. fillArray2D(double[][] arr, double value)
  2. fillArrayWith(byte[] dest, byte[] pattern)
  3. fillArrayWithByte(byte[] array, byte value)
  4. fillArrayWithHalfSorted(int[] nums)
  5. fillColor(int[][] dist)