86.4k views
2 votes
The for statement executes a set of statements a fixed number of times.
1) True
2) False

User GansPotter
by
8.3k points

1 Answer

4 votes

Final answer:

The statement is true. The for statement is a control flow statement that executes a set of statements a fixed number of times.

Step-by-step explanation:

The statement is true.

The for statement is a control flow statement that executes a set of statements a fixed number of times, known as the iteration.The number of times the statements will be executed is determined by the initialization, condition, and increment/decrement of the loop control variable.

For example:

for(int i=0; i<5; i++) {
System.out.println("Hello, World!");
}

This for loop will execute the statement inside it 5 times, printing "Hello, World!" each time.

User Udara Kasun
by
7.2k points