English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to first multiply a BigDecimal value to 10000 and then cast the result as Long. Please help

2006-11-01 07:57:47 · 3 answers · asked by Sami 2 in Computers & Internet Programming & Design

3 answers

new Long (myBigDecimal.multiply (new BigDecimal (10000)).longValue());

2006-11-01 10:13:53 · answer #1 · answered by n0body 4 · 0 0

If the number is within the range, why can't you just unbox it as a long? You should be able to just long bob = (long)BigDecimal;

2006-11-01 17:26:28 · answer #2 · answered by evolver 6 · 0 0

And why would you need to do this?

2006-11-01 15:59:25 · answer #3 · answered by Peanut to the rescue! 4 · 0 0

fedest.com, questions and answers