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. Good
View Tutorial          By: sirisha at 2009-09-08 23:04:22

2. Except for when you're programming low level hardw
View Tutorial          By: Jonathan H at 2012-05-10 08:46:48

3. Gracias.
View Tutorial          By: maiki at 2015-03-05 15:20:05

4. well understood
View Tutorial          By: shanthini at 2014-04-07 17:19:20

5. semicolon(*;) is missed in first line..con .close(
View Tutorial          By: Reddymalla Babu Sircilla at 2013-02-22 09:01:29

6. i am getting the following error:
cannot fi

View Tutorial          By: santhosh at 2009-09-24 09:13:57

7. You should consider using different threads that a
View Tutorial          By: Jeremy at 2010-01-13 23:02:11

8. Yes, as @ Mansi said it's really helpful.
I

View Tutorial          By: Eko SW at 2011-06-22 23:38:22

9. I have maked all you said and when I open jsp I am
View Tutorial          By: ismail at 2011-03-16 04:08:53

10. yes it is good example for abstract classes.Thanks
View Tutorial          By: Nilesh Chavan at 2010-07-17 02:24:42