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. Thank you, Every thing is working fine...!!

View Tutorial          By: Purushothaman at 2009-04-10 07:18:38

2. Thanks! Can u explain how to use PreparedStatement
View Tutorial          By: Shashank Araokar at 2007-05-07 07:41:54

3. I am wanting to use a Honeywell 4600g handheld sca
View Tutorial          By: bugdrvr1970 at 2012-01-25 17:27:43

4. does this code work with netbeans. if not can anyo
View Tutorial          By: Alton at 2010-04-02 22:36:57

5. Hi,
I have problem of calling javascript fu

View Tutorial          By: Shakti Prasad Priyakumar at 2008-06-06 06:11:52

6. Very nice and easy to understand, keep it up !!
View Tutorial          By: claudiu at 2010-02-07 06:12:30

7. import java.io.*;
import java.util.Stack;
View Tutorial          By: jack&jill at 2011-07-26 06:40:32

8. hi I want to send SMS to mutiple no.s. Is it possi
View Tutorial          By: gaurav at 2011-05-17 09:54:12

9. Nice one really helpful thanks
View Tutorial          By: Shashikant at 2012-01-06 12:00:45

10. very good example....but not explained well, begin
View Tutorial          By: ashish at 2012-06-06 17:34:57