What should be the correct java type mapping to match oracle number(22,2) type in underlying table column, so that it doesn’t overflow?
will it fit in Double or must use BigDecimal ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Both will do. But
doublecan’t be used to represent any decimal value, whereasBigDecimalcan. Choose the one that fits best for your case. If it’s used to represent monetary amounts, definitely useBigDecimal.