package A75;
import java.text.DecimalFormat;
import java.text.ParseException;
public class Baoliu2 {
public static void main(String[] args) throws ParseException {
double d = 123.567;
DecimalFormat df = new DecimalFormat("0.00");
String s= df.format(d);
System.out.println("s = " + s);
Number n = df.parse("123.57");
double v = n.doubleValue();
System.out.println("v = " + v);
double moy = 123456789.678;
DecimalFormat df2 = new DecimalFormat("000,000.00");
String s2 = df2.format(moy);
System.out.println("s2 = " + s2);
}
}