how to compare 3 numbers in java

Solutions on MaxInterview for how to compare 3 numbers in java by the best coders in the world

showing results for - "how to compare 3 numbers in java"
Lucas
27 Mar 2017
1if (a > b && a > c) {
2    //Here you determine second biggest, but you know that a is largest
3}
4
5if (b > a && b > c) {
6    //Here you determine second biggest, but you know that b is largest
7}    
8
9if (c > b && c > a) {
10    //Here you determine second biggest, but you know that c is largest
11}
12