Well, that is why I'm asking you to write something up. It will help you think through the problem and allow us to help you without just giving you an answer.

Right now the example you have given does not fit in with the project requirements since you would need the logical 'and' operator.

A simpler method may be to put the three values into an array. Then all you have to do is traverse the array and do a simple sort (I'd recommend doing a google for a java bubble sort) putting the largest values up front. Then just return the first two values.

You'd only need a simple if statement to do the actual value comparison.

Here is a simplified version of what you'd have to do

Array with three elements
// element values
[3][1][2]

Iterate through the array
temp var // to store values temporarily for swap, you may be able to get away without having this.
If arrayelement[index 1] < arrayelement[index 2]
temp var = arrayelement[index 1] // store first element so the value isn't lost during swap
arrayelement[index 1] = arrayelement[index 2] // swap the larger element to the beginning
arrayelement[index 2] = temp var // put the lower value back into the array after the larger one


The first iteration through would see that element one (3) is greater than element two (1) and leave it alone. The next comparison would see that element two (1) is less than element three (2) and swap it. Then you'd just display elements one and two.

There are plenty of examples of doing this with an array of ints out on the net. This solution is also scalable to support more than three values. =)