This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
1 is not getting subtracted when you do a getInt on a decimal field, but mapping can yield unexpected results.
Knowing what the field contains and the field type are the first steps towards figuring out what is happening.
Let me see if I got this right:
ResultSet.getInt("columnname") return 1799
(int)ResultSet.getDouble("columnname") returns 1800
Do not rely on a typecast to fix your problem (explicit typecasts should be avoided when possible) but return the decimal value to your code and deal with it properly, java.lang.Math might help your along your way.
Joined: Jun 22, 2011
I am now using Math class. But we could say its a undefined operation on getInt()