📄 currency.java
字号:
/* * Copyright 2007 Sun Microsystems, Inc. * All rights reserved. You may not modify, use, * reproduce, or distribute this software except in * compliance with the terms of the License at: * http://developer.sun.com/berkeley_license.html */package com.sun.bookstore1.util;import java.text.NumberFormat;import java.util.*;public class Currency { private Locale locale; private double amount; public Currency() { locale = null; amount = 0.0; } public synchronized void setLocale(Locale l) { locale = l; } public synchronized void setAmount(double a) { amount = a; } public synchronized String getFormat() { NumberFormat nf = NumberFormat.getCurrencyInstance(locale); return nf.format(amount); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -