在我的代码中,我使用整数乘以100作为小数(0.1为10等)。您能帮我格式化输出以显示为十进制吗?
int x = 100; DecimalFormat df = new DecimalFormat("#.00"); // Set your desired format here. System.out.println(df.format(x/100.0));