作者tramstb (阿登)
看板java
标题[问题] DecimalFormat中的 format method
时间Mon Mar 24 22:24:28 2014
刚刚在看 Absolute Java 第二章的时候有个部分看不太懂@@
用class DecimalFormat 中的method format时
若pattern 为 "##0.##E0" 输入为12345 则输出为:12.3E3
以下为课文描述片段:
the minimum number of significant digits in the mantissa(that is,
the sum of the number of digits before and after the dicimal point)
is the minimum of the number of digits indicated before the decimal
point plus the maximum of the number of digits indicated after the
decimal point.
我知道#,0,E 各自的意义
例如 pattern 为 "000.000" 输入为12.3456 则输出为:012.346
原文每个字都懂 可是不太了解他的意思@@
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 36.237.117.225