NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.UK);
BigDecimal b = new BigDecimal("10");
System.out.println (String.format("Data %s", nf.format(b.doubleValue())));
此输出
数据?10
如何获得英镑符号,对于美国,如果我更改区域设置,它会输出美元符号。
最佳答案
问题在于呈现您的响应的编码。浏览this great tutorial
关于java - 数字格式中的井号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4392824/