nie wiem czemu dany kod nie działa dla int było wszystko ok (powinno wyrzucić 0)
import java.util.*;
public class Glowna {
public static void main(String[] args) {
double x ;
for(x=-10.0;x<=10.0;)
{
if(Math.abs(x-1.0) == Math.abs(x+1.0)) System.out.println(x+);
x=x+0.1;
}
}
}