Algorithms/Find maximum/Java findMax method 2