Maximum area of longest diagonal rectangle(Direct Solution)
\n# Code\njava []\nclass Solution {\n    public int areaOfMaxDiagonal(int[][] nums) {\n        int max=0;\n        double maxd=0;\n        for(int i[]:nums){\n 
\n# Code\n```java []\nclass Solution {\n    public int areaOfMaxDiagonal(int[][] nums) {\n        int max=0;\n        double maxd=0;\n        for(int i[]:nums){\n            int a=i[0];\n            int b=i[1];\n            double c=(Math.sqrt(a*a + b*b));\n            if(c>=maxd){\n                if(c==maxd){\n                    int temp=a*b;\n                    if(max<=temp){\n                        max=temp;\n                    }\n                }\n                else{\n                        maxd=c;\n                        max=a*b;\n                    }\n            }\n\n        }\n        return max;\n    }\n}\n```
['Java']