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. setListAdapter(new ArrayAdapter<String>(

View Tutorial          By: Mark at 2013-02-02 02:25:42

2. meow is simple and awesome
View Tutorial          By: vishnu prasanth at 2013-01-10 10:00:35

3. hi, good afternoon
i don,t know how to use

View Tutorial          By: Hemanshu at 2012-01-17 06:49:10

4. java.lang.IllegalArgumentException
at java

View Tutorial          By: gopal at 2011-03-21 00:45:51

5. Thanks for the tips.

I hesitated to

View Tutorial          By: Dick at 2011-10-09 15:21:50

6. more daitlled coding for me
View Tutorial          By: fred at 2008-07-15 05:56:49

7. I've been learning C++/C for the past year or so,
View Tutorial          By: William Semple at 2013-01-05 17:53:30

8. pl tel me how to open port no

i can

View Tutorial          By: SUdhir at 2011-01-28 00:21:55

9. In listing 6.2 I don't see the variable name itsAg
View Tutorial          By: JC at 2013-04-16 01:49:52

10. too good post....very easy to understand
View Tutorial          By: Rahul at 2013-03-04 17:09:58