int[] arr = new int[5];
for (int i = 0; i < arr.length; i++) {
arr[i] = 10;
}
int[] arr = new int[5];
Arrays.setAll(arr, i -> 10);
int[] arr = new int[5];
Arrays.fill(arr, 10);
int[] arr = IntStream.generate(() -> 10).limit(5).toArray();
int[] temp = new int[5];
Arrays.fill(temp, 10);
int[] arr = Arrays.copyOf(temp, temp.length);