To find a negative number or positive number in java program
//Brute force class Main { public static void main (String[]args) {
int num = 5;
//Conditions to check if the number is negative or positive
if (num > 0)
System.out.println ("The number is positive");
else if (num < 0)
System.out.println ("The number is negative");
else
System.out.println ("Zero");
} }