JAVA | USED JUST LOGIC✔EXPLAINATION
\nclass Solution {\n    public int maximumProduct(int[] nums) {\n        Arrays.sort(nums);\n        int n = nums.length;\n        int ans = Integer.MIN_VALUE;\
```\nclass Solution {\n    public int maximumProduct(int[] nums) {\n        Arrays.sort(nums);\n        int n = nums.length;\n        int ans = Integer.MIN_VALUE;\n        \n        ans = Math.max(nums[0]*nums[1]*nums[n-1], nums[n-1]*nums[n-2]*nums[n-3]);\n        \n        return ans;\n    }\n}\n```
['Math', 'Java']