Arrays: fill(double[] a, int fromIndex, int toIndex, double val) : Arrays « java.util « Java by API






Arrays: fill(double[] a, int fromIndex, int toIndex, double val)

  
 
import java.util.Arrays;

public class Main {
  public static void main(String[] argv) throws Exception {

    int startIndex = 0;
    int endIndex = 4;
    double[] doubleArr = new double[10];
    double doubleFillValue = 1;
    Arrays.fill(doubleArr, startIndex, endIndex, doubleFillValue);
  }
}

   
    
  








Related examples in the same category

1.Arrays: asList(T[] a)
2.Arrays: binarySearch(int[] a,int key)
3.Arrays: binarySearch(Object[] a, Object key)
4.Arrays: copyOf(String[] original, int newLength)
5.Arrays: copyOfRange(String[] original, int from, int to)
6.Arrays: deepToString(Object[] a)
7.Arrays: equals(boolean[] a, boolean[] a2)
8.Arrays: equals(char[] a, char[] a2)
9.Arrays: equals(double[] a, double[] a2)
10.Arrays: equals(float[] a, float[] a2)
11.Arrays: equals(int[] a, int[] a2)
12.Arrays: equals(long[] a, long[] a2)
13.Arrays: equals(Object[] a, Object[] a2)
14.Arrays: equals(short[] a, short[] a2)
15.Arrays: fill(boolean[] a, boolean val)
16.Arrays: fill(boolean[] a, int fromIndex, int toIndex, boolean val)
17.Arrays: fill(byte[] a, byte val)
18.Arrays: fill(byte[] a, int fromIndex, int toIndex, byte val)
19.Arrays: fill(char[] a, char val)
20.Arrays: fill(char[] a, int fromIndex, int toIndex, char val)
21.Arrays: fill(double[] a, double val)
22.Arrays: fill(float[] a, float val)
23.Arrays: fill(float[] a, int fromIndex, int toIndex, float val)
24.Arrays: fill(int[] a, int val)
25.Arrays: fill(long[] a, long val)
26.Arrays: fill(long[] a, int fromIndex, int toIndex, long val)
27.Arrays: fill(Object[] a, Object val)
28.Arrays: fill(int[] a,int fromIndex,int toIndex,int val)
29.Arrays: fill(Object[] a, int fromIndex, int toIndex, Object val)
30.Arrays: fill(short[] a, short val)
31.Arrays: fill(short[] a, int fromIndex, int toIndex, short val)
32.Arrays: sort(byte[] a)
33.Arrays: sort(byte[] a, int fromIndex, int toIndex)
34.Arrays: sort(char[] a)
35.Arrays: sort(char[] a, int fromIndex, int toIndex)
36.Arrays: sort(double[] a)
37.Arrays: sort(double[] a, int fromIndex, int toIndex)
38.Arrays: sort(float[] a)
39.Arrays: sort(float[] a, int fromIndex, int toIndex)
40.Arrays: sort(in[] a)
41.Arrays: sort(T[] a, Comparator c)
42.Arrays: toString(Object[] a)