title: How to get NumberFormat instance from currency code?
body: <p>How can I get a <code>NumberFormat</code> (or <code>DecimalFormat</code>) instance corresponding to an ISO 4217 currency code (such as "EUR" or "USD") in order to format prices correctly?</p>
  
  <blockquote>
    <p><strong>Note 1:</strong> The problem I'm having is that the <code>NumberFormat</code>/<code>DecimalFormat</code> classes have a
    <code>getCurrencyInstance(Locale locale)</code> method but I can't figure out how
    to get to a <code>Locale</code> object from an ISO 4217 currency code.</p>
    
    <p><strong>Note 2:</strong> There is also a <code>java.util.Currency</code> class which has a <code>getInstance(String currencyCode)</code> method (returning the <code>Currency</code>
    instance for a given ISO 4217 currency code) but again I can't figure
    out how to get from a <code>Currency</code> object to a <code>NumberFormat</code>
    instance...</p>
  </blockquote>