[問題] DecimalFormat中的 format method

看板java作者 (阿登)時間11年前 (2014/03/24 22:24), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
剛剛在看 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
文章代碼(AID): #1JC40VrI (java)
文章代碼(AID): #1JC40VrI (java)