做个笔记。呵呵。 float input_= ((float) (Math.round(Float.parseFloat(input) * 100)) / 100); input 为要转换的变量。 input_为转换后的变量。