~/ learn/ java-from-zero/ cards/ if / else if / else
1 of 2

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/e17f6566-5fd0-4dc0-a6b0-8b23459362fb/flashcard utf-8 LF