Java Program – a simple demonstration of using the if-else statement.

Output: