62,616
社区成员
发帖
与我相关
我的任务
分享
float a = 0.9f * 3.0f;
System.out.println(a);
import java.text.DecimalFormat;
public class Num
{
public static void main(String[] args)
{
float a = 0.9f * 3.0f;
DecimalFormat df1 = new DecimalFormat("0.0");
System.out.println(df1.format(a));
}
}