public int[] shiftLeft(int[] nums) {
if(nums.length < 1)
return nums;

int first = nums[0];

for(int i = 1; i < nums.length; i++)
nums[i - 1] = nums[i];

nums[nums.length - 1] = first;

return nums;
}
What is the purpose of the above Java code?
a) To shift all elements in an array one position to the left.
b) To shift all elements in an array one position to the right.
c) To reverse the elements of an array.
d) To check if the array is sorted in descending order.