NumberFormat formatter = new DecimalFormat("#0.00”);

System.out.println(formatter.format(4.0));