# DecimalFormatSymbols

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/java/text/DecimalFormatSymbols#pubctors)\|[Methods](https://developer.android.com/reference/java/text/DecimalFormatSymbols#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/java/text/DecimalFormatSymbols#inhmethods)  

# DecimalFormatSymbols

`
public


class
DecimalFormatSymbols
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Cloneable](https://developer.android.com/reference/java/lang/Cloneable)`,

`[Serializable](https://developer.android.com/reference/java/io/Serializable)`


`

|---|--------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.text.DecimalFormatSymbols |

<br />

*** ** * ** ***

This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by`DecimalFormat`to format numbers.`DecimalFormat`creates for itself an instance of`DecimalFormatSymbols`from its locale data. If you need to change any of these symbols, you can get the`DecimalFormatSymbols`object from your`DecimalFormat`and modify it.  
**See also:**

- [Locale](https://developer.android.com/reference/java/util/Locale)
- [DecimalFormat](https://developer.android.com/reference/java/text/DecimalFormat)

## Summary

|                                                                                                                                ### Public constructors                                                                                                                                 ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols#DecimalFormatSymbols())`() ` Create a DecimalFormatSymbols object for the default[FORMAT](https://developer.android.com/reference/java/util/Locale.Category#FORMAT)locale.         |
| ` `[DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols#DecimalFormatSymbols(java.util.Locale))`(`[Locale](https://developer.android.com/reference/java/util/Locale)` locale) ` Create a DecimalFormatSymbols object for the given locale. |

|                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                 ||
|----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Object](https://developer.android.com/reference/java/lang/Object)                                          | ` `[clone](https://developer.android.com/reference/java/text/DecimalFormatSymbols#clone())`() ` Standard override.                                                                                                                                                                                                                |
| ` boolean`                                                                                                     | ` `[equals](https://developer.android.com/reference/java/text/DecimalFormatSymbols#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Override equals.                                                                                                                        |
| ` static `[Locale[]](https://developer.android.com/reference/java/util/Locale)                                 | ` `[getAvailableLocales](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getAvailableLocales())`() ` Returns an array of all locales for which the`getInstance`methods of this class can return localized instances.                                                                                       |
| ` `[Currency](https://developer.android.com/reference/java/util/Currency)                                      | ` `[getCurrency](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getCurrency())`() ` Gets the currency of these DecimalFormatSymbols.                                                                                                                                                                      |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                          | ` `[getCurrencySymbol](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getCurrencySymbol())`() ` Returns the currency symbol for the currency of these DecimalFormatSymbols in their locale.                                                                                                               |
| ` char`                                                                                                        | ` `[getDecimalSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getDecimalSeparator())`() ` Gets the character used for decimal sign.                                                                                                                                                             |
| ` char`                                                                                                        | ` `[getDigit](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getDigit())`() ` Gets the character used for a digit in a pattern.                                                                                                                                                                           |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                          | ` `[getExponentSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getExponentSeparator())`() ` Returns the string used to separate the mantissa from the exponent.                                                                                                                                 |
| ` char`                                                                                                        | ` `[getGroupingSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getGroupingSeparator())`() ` Gets the character used for grouping separator.                                                                                                                                                     |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                          | ` `[getInfinity](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInfinity())`() ` Gets the string used to represent infinity.                                                                                                                                                                           |
| ` static final `[DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols) | ` `[getInstance](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInstance())`() ` Gets the`DecimalFormatSymbols`instance for the default locale.                                                                                                                                                        |
| ` static final `[DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols) | ` `[getInstance](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInstance(java.util.Locale))`(`[Locale](https://developer.android.com/reference/java/util/Locale)` locale) ` Gets the`DecimalFormatSymbols`instance for the specified locale.                                                           |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                          | ` `[getInternationalCurrencySymbol](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInternationalCurrencySymbol())`() ` Returns the ISO 4217 currency code of the currency of these DecimalFormatSymbols.                                                                                               |
| ` char`                                                                                                        | ` `[getMinusSign](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getMinusSign())`() ` Gets the character used to represent minus sign.                                                                                                                                                                    |
| ` char`                                                                                                        | ` `[getMonetaryDecimalSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getMonetaryDecimalSeparator())`() ` Returns the monetary decimal separator.                                                                                                                                               |
| ` char`                                                                                                        | ` `[getMonetaryGroupingSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getMonetaryGroupingSeparator())`() ` Gets the character used for grouping separator for currencies.                                                                                                                      |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                          | ` `[getNaN](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getNaN())`() ` Gets the string used to represent "not a number".                                                                                                                                                                               |
| ` char`                                                                                                        | ` `[getPatternSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getPatternSeparator())`() ` Gets the character used to separate positive and negative subpatterns in a pattern.                                                                                                                   |
| ` char`                                                                                                        | ` `[getPerMill](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getPerMill())`() ` Gets the character used for per mille sign.                                                                                                                                                                             |
| ` char`                                                                                                        | ` `[getPercent](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getPercent())`() ` Gets the character used for percent sign.                                                                                                                                                                               |
| ` char`                                                                                                        | ` `[getZeroDigit](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getZeroDigit())`() ` Gets the character used for zero.                                                                                                                                                                                   |
| ` int`                                                                                                         | ` `[hashCode](https://developer.android.com/reference/java/text/DecimalFormatSymbols#hashCode())`() ` Override hashCode.                                                                                                                                                                                                          |
| ` void`                                                                                                        | ` `[setCurrency](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setCurrency(java.util.Currency))`(`[Currency](https://developer.android.com/reference/java/util/Currency)` currency) ` Sets the currency of these DecimalFormatSymbols.                                                                   |
| ` void`                                                                                                        | ` `[setCurrencySymbol](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setCurrencySymbol(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` currency) ` Sets the currency symbol for the currency of these DecimalFormatSymbols in their locale.                     |
| ` void`                                                                                                        | ` `[setDecimalSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setDecimalSeparator(char))`(char decimalSeparator) ` Sets the character used for decimal sign.                                                                                                                                    |
| ` void`                                                                                                        | ` `[setDigit](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setDigit(char))`(char digit) ` Sets the character used for a digit in a pattern.                                                                                                                                                             |
| ` void`                                                                                                        | ` `[setExponentSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setExponentSeparator(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` exp) ` Sets the string used to separate the mantissa from the exponent.                                            |
| ` void`                                                                                                        | ` `[setGroupingSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setGroupingSeparator(char))`(char groupingSeparator) ` Sets the character used for grouping separator.                                                                                                                           |
| ` void`                                                                                                        | ` `[setInfinity](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setInfinity(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` infinity) ` Sets the string used to represent infinity.                                                                              |
| ` void`                                                                                                        | ` `[setInternationalCurrencySymbol](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setInternationalCurrencySymbol(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` currencyCode) ` Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols. |
| ` void`                                                                                                        | ` `[setMinusSign](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setMinusSign(char))`(char minusSign) ` Sets the character used to represent minus sign.                                                                                                                                                  |
| ` void`                                                                                                        | ` `[setMonetaryDecimalSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setMonetaryDecimalSeparator(char))`(char sep) ` Sets the monetary decimal separator.                                                                                                                                      |
| ` void`                                                                                                        | ` `[setMonetaryGroupingSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setMonetaryGroupingSeparator(char))`(char monetaryGroupingSeparator) ` Sets the character used for grouping separator for currencies.                                                                                    |
| ` void`                                                                                                        | ` `[setNaN](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setNaN(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` NaN) ` Sets the string used to represent "not a number".                                                                                       |
| ` void`                                                                                                        | ` `[setPatternSeparator](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setPatternSeparator(char))`(char patternSeparator) ` Sets the character used to separate positive and negative subpatterns in a pattern.                                                                                          |
| ` void`                                                                                                        | ` `[setPerMill](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setPerMill(char))`(char perMill) ` Sets the character used for per mille sign.                                                                                                                                                             |
| ` void`                                                                                                        | ` `[setPercent](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setPercent(char))`(char percent) ` Sets the character used for percent sign.                                                                                                                                                               |
| ` void`                                                                                                        | ` `[setZeroDigit](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setZeroDigit(char))`(char zeroDigit) ` Sets the character used for zero.                                                                                                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### DecimalFormatSymbols

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public DecimalFormatSymbols ()
```

Create a DecimalFormatSymbols object for the default[FORMAT](https://developer.android.com/reference/java/util/Locale.Category#FORMAT)locale. It is recommended that the[getInstance](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInstance(java.util.Locale))method is used instead.

This is equivalent to calling[DecimalFormatSymbols(Locale.getDefault(Locale.Category.FORMAT))](https://developer.android.com/reference/java/text/DecimalFormatSymbols#DecimalFormatSymbols(java.util.Locale)).

<br />

**See also:**

- [Locale.getDefault(java.util.Locale.Category)](https://developer.android.com/reference/java/util/Locale#getDefault(java.util.Locale.Category))
- [Locale.Category.FORMAT](https://developer.android.com/reference/java/util/Locale.Category#FORMAT)  

### DecimalFormatSymbols

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public DecimalFormatSymbols (Locale locale)
```

Create a DecimalFormatSymbols object for the given locale. It is recommended that the[getInstance](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInstance(java.util.Locale))method is used instead. If the specified locale contains the[Locale.UNICODE_LOCALE_EXTENSION](https://developer.android.com/reference/java/util/Locale#UNICODE_LOCALE_EXTENSION)for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example,  

```
 NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai"))
 
```
This may return a`NumberFormat`instance with the Thai numbering system, instead of the Latin numbering system.

<br />

<br />

|                  Parameters                   ||
|----------|-------------------------------------|
| `locale` | `Locale`: the desired locale <br /> |

|                                                      Throws                                                       ||
|------------------------------------------------------------------------------------------------|-------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if`locale`is null |

## Public methods

### clone

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Object clone ()
```

Standard override.

<br />

|                                               Returns                                                ||
|--------------------------------------------------------------------|----------------------------------|
| [Object](https://developer.android.com/reference/java/lang/Object) | a clone of this instance. <br /> |

### equals

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean equals (Object obj)
```

Override equals.

<br />

|                             Parameters                              ||
|-------|--------------------------------------------------------------|
| `obj` | `Object`: the reference object with which to compare. <br /> |

|                                         Returns                                          ||
|-----------|-------------------------------------------------------------------------------|
| `boolean` | `true`if this object is the same as the obj argument;`false`otherwise. <br /> |

### getAvailableLocales

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Locale[] getAvailableLocales ()
```

Returns an array of all locales for which the`getInstance`methods of this class can return localized instances. It must contain at least a`Locale`instance equal to[Locale.US](https://developer.android.com/reference/java/util/Locale#US).

<br />

|                                                                              Returns                                                                               ||
|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| [Locale[]](https://developer.android.com/reference/java/util/Locale) | an array of locales for which localized`DecimalFormatSymbols`instances are available. <br /> |

### getCurrency

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Currency getCurrency ()
```

Gets the currency of these DecimalFormatSymbols. May be null if the currency symbol attribute was previously set to a value that's not a valid ISO 4217 currency code.

<br />

|                                                  Returns                                                  ||
|------------------------------------------------------------------------|-----------------------------------|
| [Currency](https://developer.android.com/reference/java/util/Currency) | the currency used, or null <br /> |

### getCurrencySymbol

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getCurrencySymbol ()
```

Returns the currency symbol for the currency of these DecimalFormatSymbols in their locale.

<br />

|                                            Returns                                             ||
|--------------------------------------------------------------------|----------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the currency symbol <br /> |

### getDecimalSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getDecimalSeparator ()
```

Gets the character used for decimal sign. Different for French, etc.

<br />

|                      Returns                       ||
|--------|--------------------------------------------|
| `char` | the character used for decimal sign <br /> |

### getDigit

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getDigit ()
```

Gets the character used for a digit in a pattern.

<br />

|                          Returns                           ||
|--------|----------------------------------------------------|
| `char` | the character used for a digit in a pattern <br /> |

### getExponentSeparator

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getExponentSeparator ()
```

Returns the string used to separate the mantissa from the exponent. Examples: "x10\^" for 1.23x10\^4, "E" for 1.23E4.

<br />

|                                                 Returns                                                  ||
|--------------------------------------------------------------------|--------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the exponent separator string <br /> |

**See also:**

- [setExponentSeparator(java.lang.String)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setExponentSeparator(java.lang.String))  

### getGroupingSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getGroupingSeparator ()
```

Gets the character used for grouping separator. Different for French, etc.

<br />

|                Returns                ||
|--------|-------------------------------|
| `char` | the grouping separator <br /> |

### getInfinity

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getInfinity ()
```

Gets the string used to represent infinity. Almost always left unchanged.

<br />

|                                                   Returns                                                   ||
|--------------------------------------------------------------------|-----------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the string representing infinity <br /> |

### getInstance

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final DecimalFormatSymbols getInstance ()
```

Gets the`DecimalFormatSymbols`instance for the default locale.

This is equivalent to calling[getInstance(Locale.getDefault(Locale.Category.FORMAT))](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getInstance(java.util.Locale)).

<br />

|                                                                 Returns                                                                 ||
|------------------------------------------------------------------------------------------------|-----------------------------------------|
| [DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols) | a`DecimalFormatSymbols`instance. <br /> |

**See also:**

- [Locale.getDefault(java.util.Locale.Category)](https://developer.android.com/reference/java/util/Locale#getDefault(java.util.Locale.Category))
- [Locale.Category.FORMAT](https://developer.android.com/reference/java/util/Locale.Category#FORMAT)  

### getInstance

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final DecimalFormatSymbols getInstance (Locale locale)
```

Gets the`DecimalFormatSymbols`instance for the specified locale. If the specified locale contains the[Locale.UNICODE_LOCALE_EXTENSION](https://developer.android.com/reference/java/util/Locale#UNICODE_LOCALE_EXTENSION)for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example,  

```
 NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai"))
 
```
This may return a`NumberFormat`instance with the Thai numbering system, instead of the Latin numbering system.

<br />

<br />

|                   Parameters                   ||
|----------|--------------------------------------|
| `locale` | `Locale`: the desired locale. <br /> |

|                                                                 Returns                                                                 ||
|------------------------------------------------------------------------------------------------|-----------------------------------------|
| [DecimalFormatSymbols](https://developer.android.com/reference/java/text/DecimalFormatSymbols) | a`DecimalFormatSymbols`instance. <br /> |

|                                                      Throws                                                       ||
|------------------------------------------------------------------------------------------------|-------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if`locale`is null |

### getInternationalCurrencySymbol

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getInternationalCurrencySymbol ()
```

Returns the ISO 4217 currency code of the currency of these DecimalFormatSymbols.

<br />

|                                           Returns                                            ||
|--------------------------------------------------------------------|--------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the currency code <br /> |

### getMinusSign

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getMinusSign ()
```

Gets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

<br />

|                       Returns                        ||
|--------|----------------------------------------------|
| `char` | the character representing minus sign <br /> |

### getMonetaryDecimalSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getMonetaryDecimalSeparator ()
```

Returns the monetary decimal separator.

<br />

|                    Returns                    ||
|--------|---------------------------------------|
| `char` | the monetary decimal separator <br /> |

### getMonetaryGroupingSeparator

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getMonetaryGroupingSeparator ()
```

Gets the character used for grouping separator for currencies. May be different from`grouping separator`in some locales, e.g, German in Austria.

<br />

|                    Returns                     ||
|--------|----------------------------------------|
| `char` | the monetary grouping separator <br /> |

### getNaN

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getNaN ()
```

Gets the string used to represent "not a number". Almost always left unchanged.

<br />

|                                                      Returns                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the string representing "not a number" <br /> |

### getPatternSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getPatternSeparator ()
```

Gets the character used to separate positive and negative subpatterns in a pattern.

<br />

|               Returns                ||
|--------|------------------------------|
| `char` | the pattern separator <br /> |

### getPerMill

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getPerMill ()
```

Gets the character used for per mille sign. Different for Arabic, etc.

<br />

|                       Returns                        ||
|--------|----------------------------------------------|
| `char` | the character used for per mille sign <br /> |

### getPercent

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getPercent ()
```

Gets the character used for percent sign. Different for Arabic, etc.

<br />

|                      Returns                       ||
|--------|--------------------------------------------|
| `char` | the character used for percent sign <br /> |

### getZeroDigit

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public char getZeroDigit ()
```

Gets the character used for zero. Different for Arabic, etc.

<br />

|                  Returns                   ||
|--------|------------------------------------|
| `char` | the character used for zero <br /> |

### hashCode

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int hashCode ()
```

Override hashCode.

<br />

|                     Returns                      ||
|-------|-------------------------------------------|
| `int` | a hash code value for this object. <br /> |

### setCurrency

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setCurrency (Currency currency)
```

Sets the currency of these DecimalFormatSymbols. This also sets the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale, and the international currency symbol attribute to the currency's ISO 4217 currency code.

<br />

|                         Parameters                         ||
|------------|------------------------------------------------|
| `currency` | `Currency`: the new currency to be used <br /> |

|                                                       Throws                                                        ||
|------------------------------------------------------------------------------------------------|---------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if`currency`is null |

**See also:**

- [setCurrencySymbol(String)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setCurrencySymbol(java.lang.String))
- [setInternationalCurrencySymbol(String)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setInternationalCurrencySymbol(java.lang.String))  

### setCurrencySymbol

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setCurrencySymbol (String currency)
```

Sets the currency symbol for the currency of these DecimalFormatSymbols in their locale.

<br />

|                    Parameters                    ||
|------------|--------------------------------------|
| `currency` | `String`: the currency symbol <br /> |

### setDecimalSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setDecimalSeparator (char decimalSeparator)
```

Sets the character used for decimal sign. Different for French, etc.

<br />

|                               Parameters                               ||
|--------------------|----------------------------------------------------|
| `decimalSeparator` | `char`: the character used for decimal sign <br /> |

### setDigit

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setDigit (char digit)
```

Sets the character used for a digit in a pattern.

<br />

|                             Parameters                              ||
|---------|------------------------------------------------------------|
| `digit` | `char`: the character used for a digit in a pattern <br /> |

### setExponentSeparator

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setExponentSeparator (String exp)
```

Sets the string used to separate the mantissa from the exponent. Examples: "x10\^" for 1.23x10\^4, "E" for 1.23E4.

<br />

|                      Parameters                       ||
|-------|------------------------------------------------|
| `exp` | `String`: the exponent separator string <br /> |

|                                                     Throws                                                     ||
|------------------------------------------------------------------------------------------------|----------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if`exp`is null |

**See also:**

- [getExponentSeparator()](https://developer.android.com/reference/java/text/DecimalFormatSymbols#getExponentSeparator())  

### setGroupingSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setGroupingSeparator (char groupingSeparator)
```

Sets the character used for grouping separator. Different for French, etc.

<br />

|                         Parameters                         ||
|---------------------|---------------------------------------|
| `groupingSeparator` | `char`: the grouping separator <br /> |

### setInfinity

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setInfinity (String infinity)
```

Sets the string used to represent infinity. Almost always left unchanged.

<br />

|                          Parameters                           ||
|------------|---------------------------------------------------|
| `infinity` | `String`: the string representing infinity <br /> |

### setInternationalCurrencySymbol

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setInternationalCurrencySymbol (String currencyCode)
```

Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols. If the currency code is valid (as defined by[Currency.getInstance](https://developer.android.com/reference/java/util/Currency#getInstance(java.lang.String))), this also sets the currency attribute to the corresponding Currency instance and the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale. If the currency code is not valid, then the currency attribute is set to null and the currency symbol attribute is not modified.

<br />

|                     Parameters                     ||
|----------------|------------------------------------|
| `currencyCode` | `String`: the currency code <br /> |

**See also:**

- [setCurrency(Currency)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setCurrency(java.util.Currency))
- [setCurrencySymbol(String)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setCurrencySymbol(java.lang.String))  

### setMinusSign

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setMinusSign (char minusSign)
```

Sets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

<br />

|                            Parameters                             ||
|-------------|------------------------------------------------------|
| `minusSign` | `char`: the character representing minus sign <br /> |

### setMonetaryDecimalSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setMonetaryDecimalSeparator (char sep)
```

Sets the monetary decimal separator.

<br />

|                      Parameters                      ||
|-------|-----------------------------------------------|
| `sep` | `char`: the monetary decimal separator <br /> |

### setMonetaryGroupingSeparator

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setMonetaryGroupingSeparator (char monetaryGroupingSeparator)
```

Sets the character used for grouping separator for currencies. Invocation of this method will not affect the normal`grouping separator`.

<br />

|                                 Parameters                                  ||
|-----------------------------|------------------------------------------------|
| `monetaryGroupingSeparator` | `char`: the monetary grouping separator <br /> |

**See also:**

- [setGroupingSeparator(char)](https://developer.android.com/reference/java/text/DecimalFormatSymbols#setGroupingSeparator(char))  

### setNaN

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setNaN (String NaN)
```

Sets the string used to represent "not a number". Almost always left unchanged.

<br />

|                           Parameters                           ||
|-------|---------------------------------------------------------|
| `NaN` | `String`: the string representing "not a number" <br /> |

### setPatternSeparator

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setPatternSeparator (char patternSeparator)
```

Sets the character used to separate positive and negative subpatterns in a pattern.

<br />

|                        Parameters                        ||
|--------------------|--------------------------------------|
| `patternSeparator` | `char`: the pattern separator <br /> |

### setPerMill

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setPerMill (char perMill)
```

Sets the character used for per mille sign. Different for Arabic, etc.

<br />

|                           Parameters                            ||
|-----------|------------------------------------------------------|
| `perMill` | `char`: the character used for per mille sign <br /> |

### setPercent

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setPercent (char percent)
```

Sets the character used for percent sign. Different for Arabic, etc.

<br />

|                          Parameters                           ||
|-----------|----------------------------------------------------|
| `percent` | `char`: the character used for percent sign <br /> |

### setZeroDigit

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setZeroDigit (char zeroDigit)
```

Sets the character used for zero. Different for Arabic, etc.

<br />

|                       Parameters                        ||
|-------------|--------------------------------------------|
| `zeroDigit` | `char`: the character used for zero <br /> |