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. Nevermind, I was able to modify both applications
View Tutorial          By: Matthew at 2009-06-16 14:10:20

2. Thanks lot tutor.
View Tutorial          By: veda murthy at 2013-08-01 09:33:43

3. hi this is from Ashok....
can you send the

View Tutorial          By: Ashok at 2015-04-16 11:51:51

4. can you give me tutorial how to copy phonebook to
View Tutorial          By: rico at 2010-04-04 21:07:57

5. Hi Shreya, in Linux, the COM ports are identified
View Tutorial          By: Ramlak at 2008-06-23 03:34:11

6. werst program out put nt comming
View Tutorial          By: anu at 2012-08-02 13:09:00

7. Thanks so much for the tutorial!! Was extremely us
View Tutorial          By: Debarupa at 2012-05-10 20:23:28

8. Hey nice article Brian W. Kernighan and/or Dennis
View Tutorial          By: butt at 2013-01-17 07:12:21

9. yaar this example is easy to understand but other
View Tutorial          By: richa at 2009-09-08 13:52:37

10. setting on my nokia 7610 on mtn using operamini 4.
View Tutorial          By: DREAD at 2010-06-21 07:40:13