I have this:
public String refrescarPrecio(double cantidad)
{
DecimalFormat df = (DecimalFormat)NumberFormat.getInstance();
df.applyPattern("$ ###,###.##");
String str = "";
str = df.format(cantidad);
return str;
}
If the calculation that my program does should show "0.30", it only shows "0.3".
How could I fix it? I tried replacing the "#" with "0" but it does not work.