> 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.