JAVA DecisionMakingAndIterations
JAVA DecisionMakingAndIterations
Types of Constructs
Decision Making Statements The if and switch statements Iteration Constructs The while, do, for, and foreach statements Jump Constructs The goto, break, and continue statements
FPT- APTECH
2/10
if statements
FPT- APTECH
3/10
Use switch statements for multiple case blocks Use break statements to ensure that no fall through occurs
FPT- APTECH
4/10
Iteration Constructs
FPT- APTECH
5/10
Execute embedded statements based on Boolean value Evaluate Boolean expression at beginning of loop Execute embedded statements while Boolean value Is True
FPT- APTECH
6/10
Execute embedded statements based on Boolean value Evaluate Boolean expression at end of loop Execute embedded statements while Boolean value is True
FPT- APTECH
7/10
Place update information at the start of the loop Variables in a for block are scoped only within the block A for loop can iterate over several values
FPT- APTECH
8/10
The break statement jumps out of an iteration The continue statement jumps to the next iteration
FPT- APTECH
9/10