Java Program to check for the negative number using if statement.

Output: