```
public int maximumProduct(int[] nums) {
Arrays.sort(nums);
//One of the Three Numbers is the maximum value in the array.
int a = nums[nums.length - 1] * nums[nums.length - 2] * nums[nums.length - 3];
int b = nums[0] * nums[1] * nums[nums.length - 1];
return a > b ? a : b;
}
```

python3

```
def maximumProduct(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
nums.sort()
a = nums[-1] * nums[-2] * nums[-3]
b = nums[0] * nums[1] * nums[-1]
return max(a,b)
```