Right now I'm trying this:
int a = round(n);
What is the return type of the
round() method in the snippet?
If this is the
Math.round() method, it returns a Long when the input param is Double.
So, you will have to cast the return value:
int a = (int) Math.round(doubleVar);