Java nested-if statement

This statement allows the user to use if block inside the other if block. And the inner if is executed only if the outer if is true in condition.

Syntax of nested if statement:

Example of nested-if statement:

Output: