Unit Testing Practice

Question 1 of 4

Consider the Array

int[] arr = {1, 2, 3, 4, 5};

What are the values in arr after the following code is executed?

for (int i = 0; i < arr.length - 2; i++)

{

int temp = arr[i];

arr[i] = arr[i+1];

arr[i+1] = temp;

}