X561: rotateRight

This method takes an array of integers as its parameters and returns nothing. The method moves each element in the array to the right by one position, except the last element, which moves to the front. For example, if the original array is {1, 2, 3, 4}, the array should be {4, 1, 2, 3} after the method execution.

Examples:

rotateRight({1, 2, 3, 4})

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.