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. very good example...........
View Tutorial          By: debojit dey at 2010-07-20 15:48:38

2. very nice example
View Tutorial          By: lois at 2010-10-05 23:05:01

3. In your AndroidManifest.xml file you will have to
View Tutorial          By: Ashley at 2011-07-21 02:47:49

4. Very Good Tutorial...
Very Good For Beginne

View Tutorial          By: Yatiraj Chakre at 2011-02-02 04:28:57

5. gud tutorial but the permission denied is because
View Tutorial          By: amithooda at 2012-06-11 06:43:00

6. Timely info right when I needed it. Thanks.
View Tutorial          By: Electric Vehicles at 2008-12-10 15:15:25

7. Hi,
this is excellent stuff and I highly ap

View Tutorial          By: Nanda at 2007-11-02 04:58:30

8. Hi Braj,
You are probably using threads to

View Tutorial          By: Ramlak at 2009-01-29 20:03:14

9. Thnx.. it was clearly explained... tomorrow i have
View Tutorial          By: Susmitha Sen at 2012-03-25 09:34:29

10. why we use the java in networking and What are the
View Tutorial          By: ali mohammed at 2015-10-11 23:03:40