1String[] array = {"0","1","2","3","4","5","6","7","8","9"};
2String[] a = Arrays.copyOfRange(array, 0, 4); //<- (targetArray, start, to)
3String[] b = Arrays.copyOfRange(array, 4, array.length);
4
5Output:
6a: 0,1,2,3
7b: 4,5,6,7,8,9
1String[] array = {"0","1","2","3","4","5","6","7","8","9"};
2String[] a = Arrays.copyOfRange(array, 1, 4); //<- (targetArray, start, to)
3String[] b = Arrays.copyOfRange(array, 4, array.length);