find max value in array java without sorting