Rounding a double in java is very simple. If you have to round it to the nearest integer you could use the Math.round(double) method, but what about if you have to round it with a desired number of decimals?
Quite easy too. Using the BigDecimal.setScale(int,int) method you can choose how to round it. Following a quick example:
BigDecimal bd = new BigDecimal(123.45);
bd = bd.setScale(1,BigDecimal.ROUND_HALF_UP);
System.out.println(bd.doubleValue()); //should output 123.5