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



Ask a Question

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. thanks for our help. god bless u and again thanks.
View Tutorial          By: mehryab at 2011-05-08 14:44:21

2. If I have reliance netconnect connected to my lapt
View Tutorial          By: Shaik Allabakash at 2010-02-09 19:38:10

3. A good Article..........

Thanks!!

View Tutorial          By: Pravesh at 2011-12-08 03:34:01

4. I tried this with HttpUnit (using the custom Hostn
View Tutorial          By: Michael Gower at 2012-01-04 17:40:00

5. can i ask a program that will compute a order from
View Tutorial          By: mjae at 2011-09-12 08:02:46

6. a very rare but useful tutorial. Thanks a bunch!
View Tutorial          By: Dalitso at 2014-02-19 12:07:34

7. It is clear and understandable for beginners.

View Tutorial          By: Archana at 2011-12-14 12:31:21

8. i m new in java plz send some programs of java usi
View Tutorial          By: supriyo at 2009-09-02 02:03:38

9. The code gives the following exception :-
<

View Tutorial          By: Lourdu Felix at 2009-01-26 03:37:53

10. Very Nice and Concrete Explanation ..
View Tutorial          By: Parvesh at 2009-09-18 11:11:00