1Z0-811 Primitives, Strings and Operators • Set 8
1Z0-811 Primitives, Strings and Operators Practice Test 8 — 15 questions with explanations. Free, no signup.
A junior developer wrote the following code to compare two strings entered by a user: if (username == "admin") { grantAccess(); } else { denyAccess(); }. The code always denies access even when the user enters 'admin'. What is the most likely cause, and how should the code be fixed?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.