|
How to internationalize number |
|
|
This example code shows the use of DecimalFormat class to format any number according to the locale.
import java.text.DecimalFormat;
import java.util.Locale;
public class FrmtrExp {
public static void main(String[] args) {
DecimalFormat nf = (DecimalFormat) DecimalFormat
.getInstance(Locale.GERMAN);
System.out.println(nf.format(12345.45));
}
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.