Open In App

DecimalFormatSymbols getMonetaryDecimalSeparator() method in Java with Examples

Last Updated : 29 Jul, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The getMonetaryDecimalSeparator() method of java.text.DecimalFormatSymbols class in Java is used to get the character that is used to represent monetary decimal separator for the Locale of this DecimalFormatSymbols. This method returns the character for monetary decimal separator of that Locale.

Syntax:

public char getMonetaryDecimalSeparator()

Parameter: This method do not accept any parameter.

Return Value: This method returns an monetary decimal separator of this DecimalFormatSymbols.

Exception: This method do not throw any Exception.

Program:




// Java program to demonstrate
// the above method
  
import java.text.*;
import java.util.*;
  
public class DecimalFormatSymbolsDemo {
    public static void main(String[] args)
    {
  
        DecimalFormatSymbols dfs
            = new DecimalFormatSymbols();
  
        System.out.println("Character used for"
                           + " monetary decimal separator: "
                           + dfs.getMonetaryDecimalSeparator());
    }
}


Output:

Character used for monetary decimal separator: .

Reference: https://docs.oracle.com/javase/9/docs/api/java/text/DecimalFormatSymbols.html#getMonetaryDecimalSeparator–


Similar Reads

DecimalFormatSymbols getCurrency() method in Java with Examples
The getCurrency() method of java.text.DecimalFormatSymbols class in Java is used to get the currency for the Locale of this DecimalFormatSymbols. This method returns the currency. Syntax: public char getCurrency() Parameter: This method do not accept any parameter. Return Value: This method returns a currency of the DecimalFormatSymbols with the Lo
1 min read
DecimalFormatSymbols getPatternSeparator() method in Java with Examples
The getPatternSeparator() method of java.text.DecimalFormatSymbols class in Java is used to get the character that is used to represent pattern separator for the Locale of this DecimalFormatSymbols. This method returns the character used to separate positive and negative subpatterns in a pattern. Syntax: public char getPatternSeparator() Parameter:
1 min read
DecimalFormatSymbols getInstance(Locale) method in Java with Examples
The getInstance(Locale) method of java.text.DecimalFormatSymbols class in Java is used to get the DecimalFormatSymbols instance for the specified Locale. This method is final and cannot be overridden or changed. It takes the Locale for which the DecimalFormatSymbols is required, as a parameter and returns the respective instance of that DecimalForm
1 min read
DecimalFormatSymbols toString() method in Java with Examples
The toString() method of java.text.DecimalFormatSymbols class in Java is used to get the String value of this DecimalFormatSymbols. This method returns an integer representing the String value. Syntax: public String toString() Parameter: This method do not accept any parameter. Return Value: This method returns a String which is the String value of
1 min read
DecimalFormatSymbols hashCode() method in Java with Examples
The hashCode() method of java.text.DecimalFormatSymbols class in Java is used to get the hashCode value of this DecimalFormatSymbols. This method returns an integer representing the hashCode value. Syntax: public int hashCode() Parameter: This method do not accept any parameter. Return Value: This method returns an int which is the hashCode value o
1 min read
DecimalFormatSymbols equals() method in Java with Examples
The equals() method of java.text.DecimalFormatSymbols class in Java is used to check for equality of this DecimalFormatSymbols with the specified DecimalFormatSymbols. This method takes a DecimalFormatSymbols instance and compares it with this DecimalFormatSymbols and returns a boolean value representing the same. Syntax: public boolean equals(Obje
2 min read
DecimalFormatSymbols setCurrency() method in Java with Examples
The setCurrency(Currency) method of java.text.DecimalFormatSymbols class in Java is used to set the currency for the Locale of this DecimalFormatSymbols. This method takes the currency as the parameter and sets it. Syntax: public void setCurrency(Currency currency) Parameter: This method accepts the currency as a parameter which is the Currency tha
1 min read
DecimalFormatSymbols getAvailableLocales() method in Java with Examples
The getAvailableLocales() method of java.text.DecimalFormatSymbols class in Java is used to get the list of all of the available Locales for this DecimalFormatSymbols. This method returns an array of the Locales that are available. Syntax: public static Locales[] getAvailableLocales() Parameter: This method do not accept any parameter. Return Value
2 min read
DecimalFormatSymbols setPatternSeparator() method in Java with Examples
The setPatternSeparator(char) method of java.text.DecimalFormatSymbols class in Java is used to set the character that is used to represent pattern separator for the Locale of this DecimalFormatSymbols. This method takes the character used to separate positive and negative subpatterns in a pattern. Syntax: public void setPatternSeparator(char patte
1 min read
DecimalFormatSymbols clone() method in Java with Examples
The clone() method of java.text.DecimalFormatSymbols class in Java is used to clone this DecimalFormatSymbols. It means that this method will create another instance of DecimalFormatSymbols with all the properties the same as this DecimalFormatSymbols and return it. Syntax: public Object clone() Parameter: This method do not accept any parameter. R
1 min read