This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Woof! Where to start? Why pass an array to compare two integers? Why the double loop? What you want to do is be able to state clearly in English how you would solve the problem. If you can get your thinking clear, you will have an easier time putting it into code.
That said, look at:
max means largest, but the comment says smallest. Of course, Java doesn't care, because you can name your variables anything you want. However, it shows some confusion on your part, which in this case has resulted in wrong code.