java float转成integer,在java中将double转换为integer
In Java, I want to convert a double to an integer, I know if you do this:double x = 1.5;int y = (int)x;you get y=1. If you do this:int y = (int)Math.round(x);You'll likely get 2. However, I am wonderi...