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. I an going to try this code.
View Tutorial          By: Bhagawati Prasad at 2010-02-06 02:45:10

2. how to multiply 2.54*0.7071 using only bitwise ope
View Tutorial          By: vindya at 2012-01-12 07:23:08

3. Please tell me the process, how to compile the mid
View Tutorial          By: Manish at 2008-11-14 13:33:43

4. I need
text,number,text,number,text,num

View Tutorial          By: kabil dev at 2015-05-29 13:10:40

5. its really helpful.thanks a lot
View Tutorial          By: bena at 2015-03-04 10:39:46

6. to Donovan Aces #61, thank you, I am new to java &
View Tutorial          By: Joe at 2011-09-14 22:40:19

7. sir, i need java code to display position and velo
View Tutorial          By: Sandhya Yadav at 2015-08-20 07:16:04

8. Thank you so much for this. This helped me through
View Tutorial          By: GeeAsphyxiated at 2009-08-31 08:03:07

9. I have followed all steps but it is giving null po
View Tutorial          By: she at 2013-01-14 06:02:27

10. hi in the above example u created a example for do
View Tutorial          By: akki at 2013-02-22 06:19:14