Positive number

All the numbers greater than 0, but not equal to 0 are positive numbers.

Negative number

Similarly all the number less than 0, but not equal to 0 are negative numbers.

Logic

If the number is greater than zero that means it is positive. If the number is less than zero that means it is negative. If the number is equal to zero that means it is absolute zero.

  1. if number > 0 then print Positive.
  2. if number < 0 then print Negative.
  3. if number == 0 then print Zero.

Program

import java.util.Scanner;

public class PositiveNegativeZero {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        System.out.println("Enter any number : ");
        int number = scanner.nextInt();

        if(number > 0) {
            System.out.println("POSITIVE NUMBER.");
        }

        if(number < 0) {
            System.out.println("NEGATIVE NUMBER.");
        }

        if(number == 0) {
            System.out.println("NUMBER IS ZERO.");
        }

    }
}

Output

Enter any number : 101
POSITIVE NUMBER.