Java Solution | Shortest Code | Beats 80% submissions
Code :\n\n\nclass Solution {\n    public int maxProductDifference(int[] nums) {\n        \n\t\t//To Sort the array\n        Arrays.sort(nums);\n        \n\t\t//
Code :\n\n```\nclass Solution {\n    public int maxProductDifference(int[] nums) {\n        \n\t\t//To Sort the array\n        Arrays.sort(nums);\n        \n\t\t//Taking 2 maximum and minimum numbers\n        return (nums[nums.length-1]*nums[nums.length-2]) - (nums[0]*nums[1]);\n    }\n}\n```
['Java']