Java if else program uses if else to execute statement(s) when a condition is fulfilled. Below is a simple program which explains the usage of if else in java programming language.
Java programming if else statement
Output of program:
Nested If Else statements
You can use nested if else which means that you can use if else statements in any if or else block.