I would like to translate 10000000.0intoPREFIX10,000,000.00
10000000.0
PREFIX10,000,000.00
Can I find out which template I should pass to DecimalFormat?
NumberFormat numberFormat = new DecimalFormat(...); numberFormat.format(10000000.0);
new DecimalFormat("PREFIX#,##0.00");
This will always show at least one integer digit (e.g. 0) and use a comma as a group separator.
The pattern for the number will be:, "#,###.00"which means:
"#,###.00"
arbirary. , . . DecimalFormat JavaDoc
Source: https://habr.com/ru/post/1760909/More articles:Using Java NIO for Http pipeline - javaКто-нибудь знает хорошую CURL-оболочку для PHP, которая может быть расширена? - phpHow to create a schema for composite types? - xmlУстановка CSS-класса родительского меню из дочернего меню с использованием PHP/WordPress - cssEclipseRT / Virgo does not appear in the list of Eclipse server adapters - eclipseGet the IP address of the current Wi-Fi access point on iPhone? - iphoneTracking users with PHP session id, cookie + database - phpNested STL Vector Using Too Much Memory - c ++преобразование простой разбивки на страницы в javascript в код jquery - javascript16-битные изображения и обработка андроидов - androidAll Articles