Check out example codes for "read a file in java and store as integer array using buffered reader". It will help you in understanding the concepts better.

Code Example 1

String[] integersInString = br.readLine().split(" ");
int a[] = new int[integersInString.length];
for (int i = 0; i < integersInString.length; i++) {
    a[i] = Integer.parseInt(integersInString[i]);
}

Learn ReactJs, React Native from akashmittal.com