在android eclipse中,当显示为字符串时,double和float的计算结果有时使用小数点(需要),但有时使用指数(不好,用户会感到困惑)。无论如何都要避免指数?
请参阅String.format
文档。
只需为您的数字设置所需的格式。您可能想要String.format("%f",number)
。