Search code examples
javadecimalformateuro

Displaying a decimal Format for Euros


I want the price to be in Euros €, what do i need to change with the code below?

I have it in dollars so far

DecimalFormat dollars = new DecimalFormat( "$0.00" ); 

Solution

  • Unless, I'm missing something; you could change this

    DecimalFormat dollars = new DecimalFormat( "$0.00" ); 
    

    to

    DecimalFormat euros = new DecimalFormat( "€0.00" );  // <-- euros not dollars.