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

Output: