~/ learn/ java-from-zero/ cards/ Strings, immutability & text blocks
1 of 4

Type the correct String comparison

Type the correct String comparison

Answer

if (input.equals("yes")) {

equals compares character contents. == compares object references and will bite you on Strings.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e17f6566-5fd0-4dc0-a6b0-8b23459362fb/flashcard utf-8 LF