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

2. very nice keep sharing thanks a lot
View Tutorial          By: Adeel at 2014-09-24 09:50:00

3. the ans is good.now i cleared my dout.and the exam
View Tutorial          By: siva at 2011-12-07 14:00:13

4. me too
View Tutorial          By: bellyjoy at 2010-05-07 03:14:14

5. Nice Example .........than Q!!!
View Tutorial          By: Sreekar at 2011-06-29 15:31:50

6. Is there any way to show the dynamic bean value in
View Tutorial          By: Bala at 2008-05-04 01:40:18

7. (i'm a senior PHP programmer, but a newbie in JSP,
View Tutorial          By: LOL at 2013-03-22 08:57:21

8. Respected sir,
I am trying to embed windows

View Tutorial          By: arshad at 2011-10-22 17:05:21

9. Thanks..
Short & Sweet Description.

View Tutorial          By: Prashaad at 2012-02-23 17:37:14

10. Enough to understand basic concept.Thanks.
View Tutorial          By: Jyothylakshmy P u at 2012-09-18 05:35:48