保留两位小数点 public static void main(String[] args){double f = 0.123456;System.out.println((int)(f*100)/100.0);}