how to make float to int in java code example
Example 1: java convert float to int
int a = (int)float1
Example 2: float to int in java
Using Math.round() will round the float to the nearest integer.
int a = (int)float1
Using Math.round() will round the float to the nearest integer.