//获取金融货币格式
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.CHINA);
//带货币符号的输出
System.out.println(account_type + ":" + "current balance is" + nf.format(account.getBalance()));
需要引用
import java.text.NumberFormat
//获取金融货币格式
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.CHINA);
//带货币符号的输出
System.out.println(account_type + ":" + "current balance is" + nf.format(account.getBalance()));
需要引用
import java.text.NumberFormat