Java Program – to find the largest element in an array.

Output: