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

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. its amazing for me i learn a lot from it thanks..
View Tutorial          By: sufyan at 2014-10-26 14:39:34

2. Thanks!
View Tutorial          By: misterTi at 2015-03-18 17:48:41

3. Great sample. Happy I found this site.
View Tutorial          By: javaslave at 2008-08-03 04:43:20

4. Answer for Comment 4 :

" n=n++

View Tutorial          By: NewB_of_java at 2012-02-16 16:52:05

5. Your code is syntactically correct, but semantical
View Tutorial          By: mobinga at 2011-07-25 15:08:27

6. wonderful
simplified description
ke

View Tutorial          By: ephrem at 2010-01-14 06:12:05

7. NICE EXPLANATION >>>THANK UUUUUU
View Tutorial          By: PraVeen at 2012-07-05 10:12:25

8. i need save,delete,update use arrayList.
th

View Tutorial          By: kyaw at 2010-04-07 01:55:02

9. Hi...i know java but little....
give simple

View Tutorial          By: Murshidha at 2012-02-06 09:52:52

10. This text is a plagiary of part of K&R ANSI C
View Tutorial          By: c_apprientice at 2010-11-13 07:30:11