I�m using a field in mysql that has a DECIMAL data type, the mysql docs tell that this is the best for currency, so, I would like to know if it�s better to use float or double in java.
any help ?
Jorge Pinho / SCJP 5
Live Help via Skype - lets.talk.about.help
Dont wait for forum answers
posted 12 years ago
Not sure it really matters. I would imagine that the Java double would cover the MySQL decimal( in decimal places) whereas float would be more extensive if you get my drift. Like float goes to alot more decimal places than double and probably more than the MySQL decimal format. Plus double is a smaller value. I think its only 16 or 32 whereas float is 32 or 64. One of the two i cant remember which.
You can see my knowledge on the subject is quite extensive.