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. This is very clear and explains the concepts in a
View Tutorial          By: Reite at 2011-02-18 13:55:07

2. im taking hard time in doing programming
View Tutorial          By: joshua louis sumalinog at 2014-12-11 03:26:46

3. In the above program, the instance variables like
View Tutorial          By: Abhikumar.M at 2012-08-02 17:25:55

4. hi,i am new in java..plz send me java programmes i
View Tutorial          By: dinesh at 2012-12-30 15:58:31

5. where i put this rar file to include comm api
View Tutorial          By: shubham bansal at 2015-02-20 12:13:16

6. if a class is declared as abstract and it contains
View Tutorial          By: nagaraj at 2012-04-25 17:12:30

7. can you help me in codings for get an output like
View Tutorial          By: Sudhar at 2011-08-24 05:47:53

8. its really a good post... very informative..
View Tutorial          By: javagava at 2011-12-13 19:49:08

9. Hi Sir,
Thank You so much for your

View Tutorial          By: kareena at 2010-10-21 23:26:37

10. Hi, i am trying this code but at compile time it w
View Tutorial          By: swapnil at 2012-12-16 01:37:57