Java Program to find Positive and Negative Number

This java program will tell you whether the number is positive or negative.

class Abc
{
public static void main(String args[])
{
int a= -50;
if(a>0)
{
System.out.println(“A is a positive number”);
}
else
System.out.println(“A is nagative number”);
}
}

Add Comment