I searched a lot but nothing helped me :( Suppose I need convert 12.090.129.019.201.920.192.091.029.102.901.920.192.019.201.920 (in Portuguese group separator: .) to BigInteger value. How to do that conversion? I tried use NumberFormat, DecimalFormat and nothing works or I didn't on right way :(
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Get a
NumberFormat
instance for a PortugueseLocale
, and thenparse
the number with it. This will also handle locale-specific decimal separators.DEMO.
Wouldn't it be more straightforward to remove the separators instead? Java doesn't pay attention to those internally.
If you need it back, then you can use NumberFormat.format() to get the value back.