Comment on Tutorial - float vs double data types in Java By Baski



Comment Added by : David

Comment Added at : 2009-10-08 13:47:08

Comment on Tutorial : float vs double data types in Java By Baski
"For example, float can be useful when representing dollars and cents."

This is wrong. VERY wrong. You should never, under any circumstances, use a float to represent money.

It's better to use scaled integers or, failing that, BCD.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. how do i cast the contents of the arraylist to dou
View Tutorial          By: ronnie at 2010-01-27 00:04:25

2. Hi,
i tried this way.that works perfectly.

View Tutorial          By: indu at 2009-06-08 03:13:51

3. Hi Shweta, Thanks for pointing the typo error in t
View Tutorial          By: Jagan at 2008-07-12 21:36:46

4. Hi ,

Since both the methods in the

View Tutorial          By: Chintan at 2013-11-21 03:42:32

5. nice article..
View Tutorial          By: yummy at 2010-01-05 21:18:35

6. I am very much thankfull to you in providing the c
View Tutorial          By: c vijaychandar at 2010-05-05 10:14:59

7. hi!
please tell how i got the java comm api

View Tutorial          By: suresh at 2010-08-22 03:29:06

8. what are the required equipments to run j2me
View Tutorial          By: messi at 2012-11-13 13:15:18

9. How can I submit my query in here?
View Tutorial          By: Kafedha Rwezaula at 2010-06-04 01:32:30

10. providing explanation about the topics is very use
View Tutorial          By: vikram naidu at 2010-06-09 23:40:41