FAFaraz Alaminfarazalam2017.hashnode.dev·Mar 11, 2024 · 6 min readArraysWrite a program to find the greatest and smallest element in an array. public class Main { public static int greatest(int arr[]){ int n= arr.length; int maxNumber= Integer.MIN_VALUE; for(int i=0; i<n;i++){ ...00