- If
if(condition) {statement}
- If Else
if(condition) {statement}
else {statement}
- If Else If
if(condition) {statement}
else if(condition) {statement}
else {statement}
- Ternary Operator
condition ? {statementIfTrue} : {statementIfFalse}
- Switch
switch (variable) {
// Variable can be String or Integer
// Executes the statement that matches and all other statements after that
case value1: statement1
case value2: statement2
default: statement
}
break
=> Breaks the flow of iteration
continue
=> Moves to next iteration