SyntaxFix
Write A Post
Hire A Developer
Questions
All other answer are correct, but remember that if you cast double to int you will loss decimal value.. so 2.9 double become 2 int.
You can use Math.round(double) function or simply do :
Math.round(double)
(int)(yourDoubleValue + 0.5d)