The Arrays.copyOfRange()
method was not introduced until API level 9
. Make sure you use this as the minimum SDK.
Also, you are indexing incorrectly. In java, if you have an array of size 5
, indexes range from 0->4
Change the code as follows:
int[] debug = new int[5]; int[] x = Arrays.copyOfRange(debug,0,4);
slayton
source share