Answers for "how to compare 3 numbers in java"

2

how to compare 3 numbers in java

if (a > b && a > c) {
    //Here you determine second biggest, but you know that a is largest
}

if (b > a && b > c) {
    //Here you determine second biggest, but you know that b is largest
}    

if (c > b && c > a) {
    //Here you determine second biggest, but you know that c is largest
}
Posted by: Guest on August-26-2021

Code answers related to "how to compare 3 numbers in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language