Half

 public class half
{
    public static void main (String[] args )
    {
    
        double x;
        
        System.out.println("X");
        System.out.println("-----------");
        
        for ( x = -10; x <= 10; x = x+0.5)
        {
            System.out.println( x );
        }
    }
}
    

Picture of the output