if statement
Also written: if, else, else if, if/else
Runs a block of code only when its condition is `true`; `else` covers the other case, and `else if` chains more tests. Java runs only the first block whose condition is true.
Also written: if, else, else if, if/else
Runs a block of code only when its condition is `true`; `else` covers the other case, and `else if` chains more tests. Java runs only the first block whose condition is true.