Code:
if ((x>0) && (x<=10))
{
    System.out.println("x is between 0 and 10");
}
else
{
    System.out.println("x is less than 0 or greater than 10");
}
For one line statments like that, you may omit the braces.