Check out example codes for "how to fill a list with a single value java". It will help you in understanding the concepts better.

Code Example 1

//x is the list and value is what it is to be set to
for (int i = 0; i < x.length; i++) {
  x[i] = value;
}

Learn ReactJs, React Native from akashmittal.com