热门搜索:
Java整数相除保留小数
public static void main(String[] args) throws IOException {
Integer x = 30;
Integer y = 9;
float diff = (float)x/(float)y;
float diff1 = (float) x/y;
DecimalFormat df = new DecimalFormat("0.00");
String s = df.format((float)x/y);
}
本站采用系统自动发货方式,付款后即出现下载入口,如有疑问请咨询在线客服!
咨询售后客服