Methods & Control Structures Flashcards

1
Q
A

For Loop

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

While Loop

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

What are the control structures used on the exam?

A

If, if/else, while, for enhanced for (for each), each.

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

the statement provides a secondary path of execution when an if clause evaluates to false.

A

The else statement

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

For Loop

A
  1. The initialization expression initializes the loop; it’s executed once, as the loop begins.
  2. When the termination expression evaluates to false, the loop terminates.
  3. The increment expression is invoked after each iteration through the loop; it is perfectly acceptable for this expression to increment or decrement a value.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly