What does the following code do?
public static ArrayList<Integer> codeBlock(ArrayList<Integer> array) {
int lastItem = array.get(array.size()- 1)
for (int i = array.size() - 1; i > 0; i--) {
array.set(i, array.get(i-1));
}
array.set(0, lastItem);
return array;
}