DecimalFormat
DecimalFormat is a concrete subclass of NumberFormat used to format decimal numbers according to a pattern, with awareness of locale-specific symbols. It is part of the java.text package in the Java standard library. A DecimalFormat instance formats numbers to produce human‑readable strings and can also parse strings back into numbers.
Pattern syntax lies at the core of DecimalFormat. The pattern uses 0 as a required digit and
DecimalFormat relies on DecimalFormatSymbols to provide locale‑specific symbols such as the decimal separator, grouping separator, percent
Thread safety is not guaranteed; instances should be confined to a single thread or protected by synchronization.