int a = 4 ; int b = 3 ; float c = ( float ) a / b;System.out.print(c); // 输出:1 如果要的到精确的结果,要用下面的方法 int a = 4 ; int b = 3 ; float c = ( float ) a / ( float ) b;System.out.print(c); // 输出:1.3333334 转载于:https://www.cnblogs.com/pricks/archive/2009/11/16/1603959.html