~/ learn/ java-from-zero/ cards/ Control Flow
1 of 11

Type an if / else if chain

Type an if / else if chain

Answer

if (score >= 90) { grade = 'A'; } else if (score >= 80) { grade = 'B'; }

Conditions are tested top to bottom; the first true branch runs and the rest are skipped.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/8fa37489-d406-4464-b339-c068afe9014a/flashcard utf-8 LF