Arrays Find the Largest Element In Array June 7, 2023June 7, 2023 piyushbajaj 0 Comments Arrays Hey, public int maxElement(int[] arr) { int max = Integer.MIN_VALUE; for (int j : arr) { max = Math.max(j, max); } return max; } Spread the love