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. "THIS IS SAMPLE EXMPLE!!!!!!!!!!11111"
View Tutorial          By: david billa at 2012-08-02 06:23:43

2. Thanks for providing this page it works with local
View Tutorial          By: Dharam Jaswal at 2012-02-02 13:19:24

3. good info to create package
View Tutorial          By: Nirdesh at 2012-10-01 03:45:02

4. if a class is declared as abstract and it contains
View Tutorial          By: nagaraj at 2012-04-25 17:12:30

5. Hi,

I can use this programme to sen

View Tutorial          By: malak at 2012-11-25 17:21:00

6. its nice explanation.
View Tutorial          By: rahul ahuja at 2010-06-13 22:33:35

7. how to write an byte array containing 10 different
View Tutorial          By: sanjana at 2015-01-17 06:32:41

8. Answer for Comment 4 :

" n=n++

View Tutorial          By: NewB_of_java at 2012-02-16 16:52:05

9. Excellent site.
View Tutorial          By: anonymous at 2011-11-06 12:07:14

10. Hello,
i was run your given program in ecli

View Tutorial          By: vishnu chauhan at 2013-01-24 11:42:16