JAVA || Easy Solution || Beginner Friendly|| 98% Faster code
\tPLEASE UPVOTE IF YOU LIKE.\n\nclass Solution {\n  public int largestPerimeter(int[] nums) {\n        Arrays.sort(nums); // sort element and select largest sid
\tPLEASE UPVOTE IF YOU LIKE.\n```\nclass Solution {\n  public int largestPerimeter(int[] nums) {\n        Arrays.sort(nums); // sort element and select largest sides to maximize perimeter.\n        int maxperimeter = 0;\n        for(int i=nums.length-1;i>1;i--) {\n            if(nums[i] < nums[i-1] + nums[i-2]) {\n                return nums[i] + nums[i-1] + nums[i-2];\n            }\n        }\n        return 0;\n    }\n}\n```
['Java']