Skip to content
Advertisement

How to multiply a BigDecimal by an integer in Java

How do you multiply a BigDecimal by an integer in Java? I tried this but its not correct.

JavaScript

Advertisement

Answer

You have a lot of type-mismatches in your code such as trying to put an int value where BigDecimal is required. The corrected version of your code:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement