KnowledgeBoat Logo

Computer Applications

Identify all the errors in the following repetitive statements.

while (z < 1 && z > 100)
{
    a = b;
}

Java Iterative Stmts

2 Likes

Answer

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

Answered By

2 Likes


Related Questions