outputArray[w:lastIndex] = array[v:lastIndex]
I want to copy a subarray into another sub array which has already been initialized.
Is there any inbuilt function which can check :
1) Number of elements to be copied are same. 2) That it is not causing an indexOutOfBoundException
On the RHS I can do something like :
Arrays.copyOfRange(array,v,lastIndex+1)
I don't know if anything can be done on the LHS.
I have to use an Integer Array + I know it defies the purpose of an array.