Hi,
I need help in arrays.
Let's say i have array that contains DD,GG and JJ.
arr="DD","GG","JJ"
if i want to insert FF in between DD and GG, i would need to shift GG and JJ one space back to have this final array.
arr="DD","FF","GG","JJ"
I have written this code but i am not sure why the final results become this way.
arr="DD","FF","JJ","JJ"
Pls advise. Thank You.Code:for (int i = arr.length +1; i > 1; i--) {
arr[i] = arr[i-1];
}

