java.time.format.DecimalStyle class acts as a central point for accessing the information. A significant part of handling dates and times is that localization. This class provides localized decimal style utilized in date and time formatting. Clone, finalize, getClass, notify, notifyAll, wait, are the methods that are declared in this class.
public final class DecimalStyle extends Object
Char before seperation: . Char after seperation: *
Character used for negative sign: -
METHOD DESCRIPTION equals(Object obj) Checks if this DecimalStyle is equal to another DecimalStyle. getAvailableLocales() Lists all the locales that are supported. getDecimalSeparator() Gets the character that represents the decimal point. getNegativeSign() Gets the character that represents the negative sign. getPositiveSign() Gets the character that represents the positive sign. getZeroDigit() Gets the character that represents zero. hashCode() This provides the hashcode for this DecimalStyle. of(Locale locale) Provides the DecimalStyle for the Specified locale. ofDefaultLocale() Provided the DecimalStyle for the default FORMAT locale. toString() This will returns a string describing this DecimalStyle. withDecimalSeparator(char decimalSeparator) Returns a copy of the info with a new character that represents the decimal point. withNegativeSign(char negativeSign) Returns a copy with a new character that represents the negative sign. withPositiveSign(char positiveSign) Returns a copy with a new character that represents the positive sign. withZeroDigit(char zeroDigit) Returns a copy with a new character that represents zero.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.