Java Control Statements and Operators
Classified in Computers
Written on in
English with a size of 5.46 KB
◦ Performs an action if a condition is true and performs a different action if the condition is false.
◦ Double-selection statement—selects between two different actions (or groups of actions).
}switch statement
◦ Performs one of several actions, based on the value of an expression.
◦ Multiple-selection statement—selects among many different actions (or groups of actions).
Iteration Statements in Java
}Four iteration statements (also called iteration statements or looping statements)
◦ Perform statements repeatedly while a loop-continuation condition remains true.
}
while and for statements perform the action(s) in their bodies zero or more times
◦ if the loop-continuation condition is initially false, the body will not execute.
}The do…while... Continue reading "Java Control Statements and Operators" »