1import java.util.Arrays;
2int[] myArray = new int[10];
3Arrays.fill(myArray,1);//This will fill the array with 1s
1// fill array with counter (for loop) (1,2,3,4,5)
2 int[] myArray = new int[5];
3 for (int i = 0; i < myArray.length; i++) {
4 myArray[i] = i + 1;
5 }