Format a number with "\u00a5###,###.###" in Java

Description

The following code shows how to format a number with "\u00a5###,###.###".

Example


//from  w ww  .  ja  v  a 2  s  .c  om
import java.text.DecimalFormat;

public class Main {
  public static void main(String[] argv) {
    DecimalFormat myFormatter = new DecimalFormat("\u00a5###,###.###");
    String output = myFormatter.format(123123123.1231231);
    System.out.println(output);
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Data Format »




Java Formatter
Java Number Formatter