1
Guys, I’m making a division between 2 Bigdecimal and I need the system to not allow 3 houses after the comma. I have a full amount and I need to divide it by the amount informed by the user. if you go to your homes after the comma means that it worked, if you give 3 houses means that the user fills the wrong value, you have to do this validation at the time of dividing using Bigdecimal?
Have you tried using setScale?
– DiegoAugusto
but the setScale, case 3 houses it will not round to two?
– HimorriveL
Yeah, I didn’t quite understand your question, now that I read it again I sort of understood what you want.
– DiegoAugusto
See if this can help: http://stackoverflow.com/questions/10899429/how-do-i-validate-precision-and-scale-with-bigdecimal
– DiegoAugusto
thank you was that same that would like ".. Scale()"
– HimorriveL
For nothing, if you managed to solve the solution post, this way you help other people with the same problem. p
– DiegoAugusto