Check out example codes for "arrays.fill java". It will help you in understanding the concepts better.
Code Example 1
import java.util.Arrays;
int[] myArray = new int[10];
Arrays.fill(myArray,1);//This will fill the array with 1s
Learn ReactJs, React Native from akashmittal.com