Cognizant Interview Question

Write JAVA program to find the maximum element in an array.