It is not printing positive because it fails the if condition. The value of your x is 0 which is not greater than 0. It does print zero and negative because it falls outside of your if condtion due to the lack of curly braces. If no {} then only the first line after the if condition is executed.
In the off chance that you want your code to print all three i.e. positive negative and zero when your x > 0 (can't see why you would do that), then you are missing curly braces and your code should look like:
public static void main(String args[]){
int x = 0;
if (x > 0)
{
System.out.println("positive ");
System.out.println("zero ");
System.out.println("negative");
}
}
For your code, this will print nothing because it fails the if condition so nothing inside curly braces will be executed.
But if you want your program to print positive when >0, negative when <0 and 0 when =0 then @hsz's answer is the one your are looking for.
if (x > 0) {System.out.println("positive ");}System.out.println("zero ");System.out.println("negative");As you can see, last 2 prints don't go under If-clause