03 Java Loops Flashcards

1
Q

Same statement is being repeated many times over, and at some point has to stop.

A

Iteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

It checks whether the repetition still needs to be executed.

A

Condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It changes the value of the variable used in the condition.

A

Expression or statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It iterates through a block of code as long as a specified condition is true.

A

While loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

It is used if you know exactly the number of times you want to loop through a block of code.

A

For loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It is once executed at the start of the loop.

A

Initializer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

It behaves similarly with how the condition in the while loop behaves.

A

Condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It performs the updates on certain variables that were used in the loop.

A

Iterator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Repetition is achieved by doing or executing the statement in the loop first, before checking the condition.

A

do-while Loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

It is when another loop exists in the body of another loop.

A

Nested loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It terminates the loop immediately, and the control of the program will move to the next statement after the loop.

A

Break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

It moves to the end of the iteration, and then the test expression is evaluated, and the update statement is evaluated in case of the for loop.

A

Continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

_____ is used for the outer loop, while ______ is used for the inner loop.

A

break, continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly