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



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. Problem
The managed bean doesn't get update

View Tutorial          By: jsfuser at 2007-12-25 22:21:54

2. Thank you very much for this tip.
View Tutorial          By: Lise at 2011-07-15 13:27:23

3. what is the output
View Tutorial          By: Raja at 2012-12-28 11:47:48

4. Excellent
View Tutorial          By: Dev at 2008-08-01 02:41:25

5. the example program that given above for recursion
View Tutorial          By: bharathi at 2012-07-17 09:31:14

6. hi,
can you tell me how to run the code to

View Tutorial          By: raghu at 2008-12-26 03:15:52

7. Question: if clone is a protected method then why
View Tutorial          By: siva kiran at 2011-01-20 11:40:23

8. Hi Nithya,
yes you can do that see the tut

View Tutorial          By: Ramlak at 2009-03-04 01:20:01

9. Nice info. I must say about this post.
than

View Tutorial          By: Ganesh Prasad at 2012-10-30 05:51:49

10. Hello,

I was able to rectify port/

View Tutorial          By: Harsh at 2011-10-09 16:54:06