Here I have integer array contains 81
values so that I need to store 9
values per array total I need to get 9 arrays. Eg: array1
from 1 to 9
and array2
from 10 to 18
and array3
from 19 to 27
like that. Can anybody help me how to get this values?
public class demo {
public static void main(String[] args) {
int num = 81;
int numArray = num / 9;
int[] input = new int[num];
for (int i = 0; i < num; i++) {
input[i] = i + 1;
}
for (int j = 0; j < input.length; j++) {
System.out.println(input[j]);
}
}
}
How to get desired result?