JAVA中的除法运算

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