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. Does not work.
View Tutorial          By: Hallo at 2012-10-25 09:50:05

2. The example program was very easy to understand un
View Tutorial          By: vijay at 2011-12-27 07:34:35

3. i have asked for refercing the object of main clas
View Tutorial          By: deepesh at 2012-08-20 10:33:58

4. hello, this code was compiled correctly, bt it wil
View Tutorial          By: anand vijay singh at 2014-05-03 12:47:24

5. VERY good info. Providing By YOU Thanx.
View Tutorial          By: Ravi singh at 2013-11-14 08:56:34

6. Sir, can i execute the program from windows enviro
View Tutorial          By: krishna at 2014-04-08 07:05:30

7. how to implement stack with using vector class
View Tutorial          By: anamika at 2015-08-25 18:58:29

8. im biginner of java programming, please give me in
View Tutorial          By: siva at 2011-11-04 06:40:45

9. Can u please help me to implement traversing forw
View Tutorial          By: Rahi at 2015-09-18 11:12:32

10. thanks becase i am very confuse what is work how t
View Tutorial          By: arvind at 2011-01-09 14:41:42