Search Results for 'java'


1 POSTS

  1. 2009/09/30 Java Floating point by 망고

Java Floating point

  • float: The float data type is a single-precision 32-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in section 4.2.3 of the Java Language Specification. As with the recommendations for byte and short, use a float (instead of double) if you need to save memory in large arrays of floating point numbers. 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. Numbers and Strings covers BigDecimal and other useful classes provided by the Java platform.

  • double: The double data type is a double-precision 64-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in section 4.2.3 of the Java Language Specification. For decimal values, this data type is generally the default choice. As mentioned above, this data type should never be used for precise values, such as currency.

Reference
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html

Posted by 망고

2009/09/30 06:26 2009/09/30 06:26
Response
No Trackback , No Comment
RSS :
http://www.shimminkyu.com/tc/rss/response/1066


Lilypie Fourth Birthday tickers

Stay Foolish, Stay Hungry.

- 망고

Site Stats

Total hits:
440236
Today:
52
Yesterday:
186