How can I copy a part of an array to another array?
Consider I’m having
int[] a = {1,2,3,4,5};
Now if I give the start index and end index of the array a it should get copied to another array.
Like if I give start index as 1 and end index as 3, the elements 2, 3, 4 should get copied in the new array.
1 Answer