Finding max value from array in Java