KnowledgeBoat Logo
|

Computer Applications

Identify all the errors in the following statements.

while (x < 1 && x > 50)
{
    a = b;
}

Java Iterative Stmts

3 Likes

Answer

The test expression x < 1 && x > 50 will never be true as the conditions x < 1 and x > 50 cannot be true at the same time. Thus, the && operator will always result in false.

Answered By

1 Like


Related Questions