0
What is the output of the above code snippet( Assume that it is written inside main() function )?
int a = 4, b = 8, c = 6;
if (a > b) {
if (a > c) {
System.out.println("a is the largest");
} else if (b > c) {
System.out.println("b is the largest");
} else {
System.out.println("c is the largest");
}
} else {
if (b > c) {
System.out.println("b is the largest");
} else {
System.out.println("c is the largest");
}
}- Ac is the largest
- Bb is the largest
- Ca is the largest
- DCompilation error
Correct answer: B