I have an array of type int:
array[0] = 1
array[1] = 2
array[2] = 3
array[3] = 4
array[4] = 5
I want to take the value at the end, and bring it the beginning and shunt the rest of the elements to the right, so my output will look like: 5, 1, 2, 3, 4
I've considered using an ArrayList, but the assignment seems to want me to just use a primitive array.
Thanks