Using the android.icu.text.NumberFormat
class:
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale("en", "AU"));
numberFormat.isGroupingUsed = true
String number = numberFormat.format(123456)
will produce 123,456
, but according to Wikipedia, Australia uses a point .
as the decimal separator. Why is NumberFormat behaving that way?
Number 123456
does not have decimals. You're observing the thousands grouping symbol ,
, not the decimal point.