Java Program a simple demonstration of using if statement.

Output: