max element would be the element at ( n - 1 ) th index of array after sorting
int maxEle = arr [ n - 1 ] ; System . out . println ( " Sum ▁ = ▁ " + findSum ( minEle , maxEle ) ) ; System . out . println ( " Product ▁ = ▁ " + findProduct ( minEle , maxEle ) ) ; } }