So you fill the large array with 20 elements.
In the if statement. if int i is less that half of the larger.length/2 (which equals 10th index)
fill the small1 array.
The else statement throws an array index out of bound. ;/
package com.codegym.task.task07.task0705;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
One large array and two small ones
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int[] larger = new int[20];
int[] small1 =new int [10];
int[] small2 = new int[10];
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String a = br.readLine();
int nums = Integer.parseInt(a);
for (int i = 0; i < larger.length; i++){
larger[i] = nums;
}
for (int i = 0; i < larger.length; i++){
if (i < larger.length/2) {
small1[i] = larger[i];
}
else {
small2[i - 1] = larger[i];
}
for (int num : larger){
System.out.println(num);
}
}
}
}