java字符串拼接时出现科学计数法问题
public class kxjsf { public static void main(String[] args) { String str = "这是拼接后的字符串:"; Double aa =1000000000d; NumberFormat nf = NumberFormat.getInstance(); System.out.println(str+aa);//这是拼接后的字符串:1.0E9 System.out.println(str+nf.format(aa));//这是拼接后的字符串:1,000,000,000 System.out.println(str+nf.format(aa).replace(",",""));//这是拼接后的字符串:1000000000 } }