I was hoping i could get some help concerning, how to move an element of an array, one index over. so that Array[0] is on Array[1] place and Array[1] is on Array[2] place and so on. The code i have so far does not want to run:
int[] p = {1, 2, 3, 4, 5};
for(int i = 0; i < p.length; i++) {
p[i + 1] = p[i];
}
Any guidance would be appreciated.