int score = 75;
if (score >= 90) {
System.out.println("A");
} else if (score >= 80) {
System.out.println("B");
} else if (score >= 70) {
System.out.println("C");
} else {
System.out.println("F");
}What is printed?
- Acheck_circle
C
- B
B
- C
F
- D
A
Explanation
score is 75. The first two conditions (>=90, >=80) fail. The third (>=70) is true, so "C" is printed and the rest of the chain is skipped.