Conditonal/Flow control
- follow through if no `break` at the end of the block - `default` - when all cases have not been matched, it run block in this section - In case statement, they can only be compile time constants of same data type of switch value ie - literals - enum constants - final constant variables which has been initialized - Multiple cases ```java case 'A': case 'B': case 'C': doSomething(); break; case 'D': case 'E': doSomethingElse(); break; default: doDefaultStuff(); break;
Links
if
Nested if
Ternary
Case/Switch
Last updated