Java Formato duplo
NumberFormat formatter = new DecimalFormat("#0.00");
System.out.println(formatter.format(4.0));
aso
NumberFormat formatter = new DecimalFormat("#0.00");
System.out.println(formatter.format(4.0));
DecimalFormat df = new DecimalFormat("#.00");
NumberFormat formatter = new DecimalFormat("#0.00");
System.out.println(formatter.format(4.0));