Since double is bigger data type than int, you can simply downcast double to int in Java . double is 64-bit primitive value and when you cast it to a 32-bit integer, anything after the decimal point is lost.
Since double is bigger data type than int, you can simply downcast double to int in Java . double is 64-bit primitive value and when you cast it to a 32-bit integer, anything after the decimal point is lost.