~/ 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/6b691496-30e0-414d-84d2-d9356b283af9/flashcard utf-8 LF