Comment on Tutorial - float vs double data types in Java By Baski



Comment Added by : rangzen

Comment Added at : 2014-03-28 09:31:47

Comment on Tutorial : float vs double data types in Java By Baski
"For example, float can be useful when representing dollars and cents."

No.

Check "Learning the Java Language / Language Basics / Primitive Data Types" : "This data type should never be used for precise values, such as currency. For that, you will need to use the java.math.BigDecimal class instead."


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. I have downloaded all the files
SMSClient.j

View Tutorial          By: Sanjay at 2010-06-29 04:48:16

2. Thanks for this explanation. I'm not sure whether
View Tutorial          By: Venkatesh Challa at 2013-03-29 04:35:21

3. cool!!!

can you show me some sample

View Tutorial          By: eduard jacob bernido at 2008-07-14 04:01:59

4. i don't understand the input attributes can u plea
View Tutorial          By: dhanalakshmi at 2011-05-05 07:10:25

5. Hi, I need the complete working code for sending a
View Tutorial          By: prakash at 2010-05-24 09:14:59

6. This is very good Article. On high level I am anba
View Tutorial          By: Sandeep at 2010-08-27 00:40:22

7. Hi mounika, Did you download and install the javac
View Tutorial          By: Ramlak at 2008-04-27 05:49:42

8. what's the deffrint between "String[] [] Arra
View Tutorial          By: ahmad at 2009-08-24 03:01:11

9. Thanks alot ,,, it is really more the excellent n
View Tutorial          By: SaraFaqera at 2013-12-16 16:00:07

10. Good start for me. At least I now know what i am s
View Tutorial          By: eoaddai at 2011-12-23 20:53:35