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



Related Tutorials

Java program to get location meta data from an image

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

Archived Comments

1. Hi friends i have one problem am register one form
View Tutorial          By: Inbaraj at 2014-07-04 05:28:55

2. Unable to understand all the points, quiet confusi
View Tutorial          By: KB at 2015-04-15 10:11:14

3. the 2 not required lines
1) #include

View Tutorial          By: saurabh at 2012-02-20 06:33:57

4. i want some more info to make my final project.
View Tutorial          By: Arshid saeed at 2010-02-18 08:18:45

5. what are the basic requirements to send sms from p
View Tutorial          By: kanagarajan at 2008-01-02 07:52:44

6. I don't get it... there seem to be only two differ
View Tutorial          By: bibiki at 2012-04-05 02:01:32

7. this is good, but i need a simple program about sh
View Tutorial          By: ramalakshmi at 2011-01-05 03:38:26

8. Your answer was right on the money! After searchi
View Tutorial          By: ooh la la at 2013-07-19 20:33:41

9. Thanks for the above description, but pls let me k
View Tutorial          By: Amit Goyal at 2009-09-25 05:33:10

10. Good article..
View Tutorial          By: Sudarshan at 2011-03-28 02:57:53