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

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

Java program to check if user input is an even number

Archived Comments

1. My teacher doesnt teach me right!
View Tutorial          By: Anon at 2009-02-20 07:16:08

2. The code is really helpfull...
reading or w

View Tutorial          By: sharda at 2010-03-11 03:28:02

3. Well first-oof, I don't see the obvious app.
View Tutorial          By: Marvin Ambrose at 2010-10-07 01:30:30

4. Can we use the if sttmt l;ike this::
if (a

View Tutorial          By: Anubhav at 2010-11-14 08:15:04

5. Thanks for the introduction of j2me
View Tutorial          By: AKbar Ali at 2009-10-19 03:56:58

6. Pastoral College is a small college in the Midwest
View Tutorial          By: James Chui at 2015-08-03 00:48:50

7. very Good machi.......
View Tutorial          By: Janani at 2013-03-04 06:37:47

8. how limit for no of users for particular role to s
View Tutorial          By: priyanka at 2014-12-16 13:39:55

9. Good.understand
View Tutorial          By: Selva at 2009-12-29 23:27:29

10. good explanation with sample example makes me to u
View Tutorial          By: jagan.java at 2013-01-04 09:10:21