Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
unless (condition) { }
if (condition) { } else { }
unless { } else { }
unless (condition) { } else { }
if (condition) { }
switch (expression) { case value: statements; default: statements; }
None of the above.
if (condition) { } else if (condition) { } else { }
if (condition) { } else { } if (condition) { }
if (condition) { } if (condition) { } else { }
if { } else if { } else { }
It is used to check if a variable is null.
It can be used as a replacement for the if-else statement.
It can be nested within other conditional statements.
All of the above.
if
else
switch
none of the above
It is used to check multiple conditions.
It is similar to the switch statement in Java.
It can be used as a replacement for if-else and switch statements.
when (expression) { case value -> statements }
switch (expression) { case value: statements; break; default: statements; }
switch (expression) { case value: statements; break; default: }
switch (expression) { case value: statements; default: }