This content has been marked as final. Show 3 replies
Integer, Long has "parse from string to int(or
long)" method in API, but bigDecimal hasn't, no idea
how to create my own.. any idea?
Aniseed's answer works, plus it will also work for a long, or double.
There are also the vlaueOf static methods for long and double, but not String
BigDecimal myBD = BigDecimal.valueOf(my_long); BigDecimal myBD = BigDecimal.valueOf(my_double);
great! Thanks the above guys, cheerful:), I will try it