Skip to main content

Java Topic Practice

If/Else Tracing

If/Else Tracing MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

int score = 18;
if (score > 36)
  System.out.print("A");
else if (score > 28)
  System.out.print("B");
else if (score > 20)
  System.out.print("C");
else
  System.out.print("D");
Choose one answer.