DecimalFormat.getCurrency() has the following syntax.
public Currency getCurrency()
In the following code shows how to use DecimalFormat.getCurrency() method.
//from ww w . j av a 2 s . com import java.text.DecimalFormat; public class Main { public static void main(String[] argv) throws Exception { DecimalFormat format = new DecimalFormat(); System.out.println(format.getCurrency()); } }
The code above generates the following result.