I'm stumped. I made the third array to reference the first array + 9. It should have printed each line but didn't. Your help is appreciated.
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[] numberArray;
numberArray = new int[20];
int[] secondArray;
secondArray = new int[10];
int[] thirdArray;
thirdArray = new int[10];
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
for(int i = 0; i <= numberArray.length-1; i++){
String input = read.readLine();
numberArray[i] = Integer.parseInt(input);
}
for(int a = 0; a < numberArray.length - 9; a++){
secondArray[a] = numberArray[a];
}
for(int b = 0; b <= numberArray.length-1; b++){
thirdArray[b] = numberArray[b + 9];
System.out.println(thirdArray[b]);
}
}
}