There is some existing code of the follow form which is used for format numerical values:
String.format( pattern, value )
You can try the following:
public static void main(String[] args) { System.out.println(String.format(" %d \u20AC", 123)); // %d for integer System.out.println(String.format(" %.2f \u20AC", 123.10)); // %f for floats }
This prints:
123 € 123.10 €