Type float or double to perform monetary calculations
[code="java"]
/*
Do not use variables of type float or double to perform monetary calculations. The imprecision
of floating-point numbers can cause incorrect monetary values.
*/
System.out.p...
原创
2011-12-21 15:11:06 ·
151 阅读 ·
0 评论