Methods & Control Structures Flashcards
1
Q
A
For Loop
2
Q
A
While Loop
3
Q
What are the control structures used on the exam?
A
If, if/else, while, for enhanced for (for each), each.
4
Q
A
5
Q
the statement provides a secondary path of execution when an if clause evaluates to false.
A
The else statement
6
Q
For Loop
A
- The initialization expression initializes the loop; it’s executed once, as the loop begins.
- When the termination expression evaluates to false, the loop terminates.
- The increment expression is invoked after each iteration through the loop; it is perfectly acceptable for this expression to increment or decrement a value.
7
Q
A