public class Test { public static void main(String[] args) { double test = -0.00000001; if(test == -0) test = 0; System.out.println(String.format("%10.2f",test)); } }