Computer Applications

State one similarity and one difference between while and for loop.

Java Iterative Stmts

ICSE 2009

66 Likes

Answer

Similarity — Both for and while are entry-controlled loops
Difference — for loop is a suitable choice when we know the number of iterations beforehand. while loop is helpful in situations where numbers of iterations is not known.

Answered By

35 Likes


Related Questions