import java.text.*;public class NumberFormatText
{
public static void main(String[] args)
{
double d=562354.78;
NumberFormat n=NumberFormat.getCurrencyInstance(Locale.GERMANY);
System.out.println(n.format(d));
}
};
能帮我看看么?我是在看了《core java》第六版的第三章后写的,在没有“Locale.GERMANY”时能正常运行来着
{
public static void main(String[] args)
{
double d=562354.78;
NumberFormat n=NumberFormat.getCurrencyInstance(Locale.GERMANY);
System.out.println(n.format(d));
}
};
能帮我看看么?我是在看了《core java》第六版的第三章后写的,在没有“Locale.GERMANY”时能正常运行来着
符号: 变量 Locale
位置: 类 NumberFormatText
NumberFormat n=NumberFormat.getCurrencyInstance(Locale.GERMANY);
^
1 错误
你还要导入NumberFormat这个类
难道这个才是得继续引用另一个类?
java.util.Locale