For this Question: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given an integer array nums representing the amount of money in each house, return the maximum amount of money you can rob tonight without alerting the police.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You have to complete the function <b>rob()</b> that takes the array nums as a parameter.

<b>Constraints:</b>
1 &le; nums.length &le; 100
0 &le; nums[i] &le; 1000Return the maximum amount of money you can rob tonight without alerting the police.Sample Input:
3
2 3 2

Sample Output:
3

<b>Explanation:</b>
You cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses., I have written this Solution Code: class Solution {
    public int rob(int[] nums) {
        int n = nums.length;
        if (n == 1) {
            return nums[0];
        }
        return Math.max(robFrom(nums, 0, n - 2), robFrom(nums, 1, n - 1));
    }
    
    public int robFrom(int[] nums, int lo, int hi) {
        int currMax = 0;
        int prevMax = 0;
        for (int i = lo; i <= hi; i++) {
            int temp = currMax;
            currMax = Math.max(currMax, prevMax + nums[i]);
            prevMax = temp;
        }
        return currMax;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?