💯Java beginner friendly solution
Intuition\nThe intuition behind this approach is to sort the array in ascending order. Once the array is sorted, the maximum product can be achieved by either m
# Intuition\nThe intuition behind this approach is to sort the array in ascending order. Once the array is sorted, the maximum product can be achieved by either multiplying the three largest numbers or the two smallest and the largest number. By comparing both possibilities, the maximum product can be determined.\n\n# Approach\n1. Sort the array in ascending order.\n2. Calculate two possible products:\n   - `a`: Product of the two smallest numbers and the largest number.\n   - `b`: Product of the three largest numbers.\n3. Return the maximum of `a` and `b`.\n\n# Complexity\n- Time complexity: $$O(n \\log n)$$ - Sorting the array takes $$O(n \\log n)$$ time.\n- Space complexity: $$O(1)$$ - Constant space is used.\n\n# Code\n```java\nimport java.util.Arrays;\n\nclass Solution {\n    public int maximumProduct(int[] nums) {\n        Arrays.sort(nums);\n        int n = nums.length - 1;\n        int a = nums[0] * nums[1] * nums[n];\n        int b = nums[n] * nums[n - 1] * nums[n - 2];\n        return Math.max(a, b);\n    }\n}\n```
['Java']