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. thanks .
it helps easy to connect..

View Tutorial          By: bastin at 2011-12-09 19:49:34

2. Hello Nishi,
The class names in your progra

View Tutorial          By: Kiran at 2011-12-16 06:32:54

3. please give some examples of postfix and infix.
View Tutorial          By: john mark at 2012-10-07 13:55:04

4. well an easy code to understand
thanks muc

View Tutorial          By: narmada at 2011-01-17 09:47:02

5. hay is there any way to perform operation or calcu
View Tutorial          By: neha at 2009-11-20 08:29:45

6. nice article...........................
View Tutorial          By: abhijit at 2012-09-24 11:12:46

7. You have simply saved my life. After 2 days dealin
View Tutorial          By: Mário Buratto at 2013-01-11 19:54:36

8. i have a error while i running this program

View Tutorial          By: parul at 2012-02-08 15:40:09

9. sir, am doing my mca project in java based on netw
View Tutorial          By: saravanapriya at 2011-11-24 03:25:06

10. hai
View Tutorial          By: ayyannan at 2011-01-21 21:27:35