想以德国的数字方式显示,程序如下:import java.text.*;
public class Try
{
public static void main(String[] args)
{
double x=10000.0/3.0;
NumberFormat formatter=NumberFormat.getNumberInstance(Locale.GERMANY);
System.out.println(formatter.format(x));
}
}
错误如下:--------------------Configuration: j2sdk1.4.0_02 <Default>--------------------
D:\Program Files\Xinox Software\JCreator Pro\MyProjects\Richard\MyProject\Try.java:9: cannot resolve symbol
symbol : variable Locale
location: class Try
NumberFormat formatter=NumberFormat.getNumberInstance(Locale.GERMANY);
^
1 errorProcess completed.哪位大侠能给解释一下出错的原因?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货