KnowledgeBoat Logo

Computer Applications

What are the parameters needed to create a for loop?

Java Iterative Stmts

117 Likes

Answer

The following parameters are commonly used in a for loop:

  1. An initial value for the loop control variable.
  2. A condition—loop will iterate as long as this condition remains true.
  3. An update expression to modify the loop control variable after every iteration.
  4. Body of the loop which consists of the statements that needs to be repeatedly executed.

Answered By

70 Likes


Related Questions