OneCompiler

We can check whether the number is negative or positive by using if statement



Example heading with h2 size

Example heading with h3 size

Following is sample java code.

int i = 10;
if(i>0){
    System.out.println('positive');
}