on 10-26-2007 7:09 PM
Hi All,
I have a BigDecimal value in my application . I want to change it to decimal value. What is the method to be used and what is the procedure?
Thanks in advance.
use method doubleValue() in BigDecimal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharath,
I think You want to convert BigDecimal to a double valueI (Since No 'Decimal' type is there in java)
Trythe method,
public double bigDecimalToDouble( java.math.BigDecimal bigDecimalVal )
{
//@@begin bigDecimalToDouble()
double val1=Double.parseDouble(""+bigDecimalVal);
return val1;
//@@end
}
let me know whether oit is useful for you.
thanks
Smitha
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.