How can i store Decimal values

I want to store decimal value :the minimum value : 0.00 and maximum value is 999999999.99can we define decimal places of decima value?please reply ASAP
[179 byte] By [myjavapa] at [2007-11-26 12:32:37]
# 1
What's wrong in using a double?
aniseeda at 2007-7-7 15:45:48 > top of Java-index,Java Essentials,Java Programming...
# 2

> can we define decimal places of decima value?

You can't do this with any of the Java primitive types (like double).

Mostly you can use double to represent quantities, do calculations etc. And then

use DecimalFormat or the String's printf() style format strings to display

the quantity with a specified number of decimal places.

pbrockway2a at 2007-7-7 15:45:48 > top of Java-index,Java Essentials,Java Programming...
# 3
If you want specified precision (number of decimals), see the BigDecimal class.
ChuckBinga at 2007-7-7 15:45:48 > top of Java-index,Java Essentials,Java Programming...