I need to convert a float number into an integer.
Can Java automatically convert float number into integers? If so, do normal rounding rules apply (e.g. 3.4 gets converted to 3, but 3.6 gets converted to 4)?
(int) a + 0.5 is of type double, which can't be assinged to an int have a try