You need to sign in to do that
Don't have an account?
Aphinya Phansawang
intValue() method return invalid value for some input
Hi,
I try to convert decimal value: 2152412850.50 to integer by using intValue() method but this method return -2142554446.
It happen for some value only. Is there any way to fix this problem or work around to convert decimal value to integer.
Thanks,
I try to convert decimal value: 2152412850.50 to integer by using intValue() method but this method return -2142554446.
It happen for some value only. Is there any way to fix this problem or work around to convert decimal value to integer.
Thanks,
Since your input is out of range, you get different value.
To resolve the issue, you have to use Long
All Answers
Since your input is out of range, you get different value.
To resolve the issue, you have to use Long
Thanks for this valuble input.it help me to resolve my issue.